Module: wine
Branch: refs/heads/master
Commit: 11eb8ee042f6b324d3b2c0457bcf5a676dfd7579
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=11eb8ee042f6b324d3b2c04…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Mon May 29 16:27:48 2006 +0100
rpcrt4: If the number of pointers is 0 for NdrFullPointerXlatInit then
set the number of pointers to a large default, so that NumberOfBuckets
doesn't end up less than zero.
---
dlls/rpcrt4/ndr_fullpointer.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c
index f4485b2..b89b669 100644
--- a/dlls/rpcrt4/ndr_fullpointer.c
+++ b/dlls/rpcrt4/ndr_fullpointer.c
@@ -32,11 +32,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(rpc);
PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(unsigned long NumberOfPointers,
XLAT_SIDE XlatSide)
{
- unsigned long NumberOfBuckets = ((NumberOfPointers + 3) & 4) - 1;
+ unsigned long NumberOfBuckets;
PFULL_PTR_XLAT_TABLES pXlatTables = HeapAlloc(GetProcessHeap(), 0, sizeof(*pXlatTables));
TRACE("(%ld, %d)\n", NumberOfPointers, XlatSide);
+ if (!NumberOfPointers) NumberOfPointers = 512;
+ NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1;
+
pXlatTables->RefIdToPointer.XlatTable =
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(void *) * NumberOfPointers);
Module: wine
Branch: refs/heads/master
Commit: 21218c8587be416f6bf4c6d546351961f14239b7
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=21218c8587be416f6bf4c6d…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon May 29 10:53:43 2006 +0200
wined3d: Release the memory in IWineGDISurface::PrivateSetup before calling GetDC.
---
dlls/wined3d/surface_gdi.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c
index 3b25ff4..b84bc25 100644
--- a/dlls/wined3d/surface_gdi.c
+++ b/dlls/wined3d/surface_gdi.c
@@ -1459,13 +1459,20 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3
HRESULT hr;
HDC hdc;
+ /* Sysmem textures have memory already allocated -
+ * release it, this avoids an unnecessary memcpy
+ */
+ HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory);
+ This->resource.allocatedMemory = NULL;
+
/* We don't mind the nonpow2 stuff in GDI */
+ This->resource.size = This->currentDesc.Width * D3DFmtGetBpp(This->resource.wineD3DDevice, This->resource.format) * This->currentDesc.Width;
This->pow2Size = This->resource.size;
This->pow2Width = This->currentDesc.Width;
This->pow2Height = This->currentDesc.Height;
This->Flags &= ~SFLAG_NONPOW2;
- /* Call GetDC to create a DIB section. We will use that
+ /* Call GetDC to create a DIB section. We will use that
* DIB section for rendering
*
* Release the DC afterwards to allow the app to use it