Module: wine Branch: refs/heads/master Commit: 5de8cd3bd6aed7dba24e91ca91598c84cdba106b URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=5de8cd3bd6aed7dba24e91ca...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Jun 1 01:13:36 2006 +0200
wined3d: Adjust the video mem when dropping the pow2 size in GDISurface.
---
dlls/wined3d/surface_gdi.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index b84bc25..086af46 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -1458,6 +1458,7 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3 IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; HRESULT hr; HDC hdc; + long oldsize = This->resource.size;
/* Sysmem textures have memory already allocated - * release it, this avoids an unnecessary memcpy @@ -1472,6 +1473,9 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3 This->pow2Height = This->currentDesc.Height; This->Flags &= ~SFLAG_NONPOW2;
+ /* Adjust the opengl mem counter */ + globalChangeGlRam(This->resource.size - oldsize); + /* Call GetDC to create a DIB section. We will use that * DIB section for rendering *