add workaround for westwood nox
This commit is contained in:
parent
b1ac125817
commit
b62b435c37
2 changed files with 7 additions and 1 deletions
|
@ -111,8 +111,10 @@ ULONG __stdcall IDirectDrawSurface__Release(IDirectDrawSurfaceImpl* This)
|
|||
if (This->mapping)
|
||||
CloseHandle(This->mapping);
|
||||
|
||||
if (This->backbuffer)
|
||||
if (This->backbuffer && (!g_ddraw || (void*)This->backbuffer != g_ddraw->last_freed_surface))
|
||||
{
|
||||
IDirectDrawSurface_Release(This->backbuffer);
|
||||
}
|
||||
|
||||
if (This->clipper)
|
||||
IDirectDrawClipper_Release(This->clipper);
|
||||
|
@ -124,6 +126,9 @@ ULONG __stdcall IDirectDrawSurface__Release(IDirectDrawSurfaceImpl* This)
|
|||
|
||||
DeleteCriticalSection(&This->cs);
|
||||
|
||||
if (g_ddraw)
|
||||
g_ddraw->last_freed_surface = This;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue