ddraw: Just use a static variable for vblank emulation.

This commit is contained in:
Henri Verbeet 2011-09-13 20:02:24 +02:00 committed by Alexandre Julliard
parent 60f6c41a67
commit 8173e6f539
2 changed files with 4 additions and 10 deletions

View File

@ -1520,21 +1520,16 @@ static HRESULT WINAPI ddraw1_GetMonitorFrequency(IDirectDraw *iface, DWORD *freq
*****************************************************************************/
static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *status)
{
IDirectDrawImpl *This = impl_from_IDirectDraw7(iface);
static BOOL fake_vblank;
TRACE("iface %p, status %p.\n", iface, status);
/* This looks sane, the MSDN suggests it too */
EnterCriticalSection(&ddraw_cs);
if(!status)
{
LeaveCriticalSection(&ddraw_cs);
return DDERR_INVALIDPARAMS;
}
*status = This->fake_vblank;
This->fake_vblank = !This->fake_vblank;
LeaveCriticalSection(&ddraw_cs);
*status = fake_vblank;
fake_vblank = !fake_vblank;
return DD_OK;
}

View File

@ -89,7 +89,6 @@ struct IDirectDrawImpl
BOOL d3d_initialized;
/* Misc ddraw fields */
BOOL fake_vblank;
BOOL initialized;
/* DirectDraw things, which are not handled by WineD3D */