wined3d: Release the memory in IWineGDISurface::PrivateSetup before calling GetDC.
This commit is contained in:
parent
fe2becaee3
commit
21218c8587
|
@ -1459,7 +1459,14 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue