wined3d: Adjust the video mem when dropping the pow2 size in GDISurface.

This commit is contained in:
Stefan Dösinger 2006-06-01 01:13:36 +02:00 committed by Alexandre Julliard
parent 349b93ae57
commit 5de8cd3bd6
1 changed files with 4 additions and 0 deletions

View File

@ -1458,6 +1458,7 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
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(IWineD3DSurface *iface)
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
*