Move critical section to main ddraw, fix shadow window bug when exiting fullscreen

This commit is contained in:
Toni Spets 2010-11-15 22:25:12 +02:00
parent 40f196bc8f
commit fdf8395dd1
4 changed files with 23 additions and 19 deletions

View file

@ -46,16 +46,9 @@ ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This)
{
if(This->caps == DDSCAPS_PRIMARYSURFACE)
{
if(ddraw->render.run)
{
EnterCriticalSection(&ddraw->render.cs);
ddraw->primary = NULL;
LeaveCriticalSection(&ddraw->render.cs);
}
else
{
ddraw->primary = NULL;
}
EnterCriticalSection(&ddraw->cs);
ddraw->primary = NULL;
LeaveCriticalSection(&ddraw->cs);
}
if(This->surface)
{