ddraw: Just use a static variable for vblank emulation.
This commit is contained in:
parent
60f6c41a67
commit
8173e6f539
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue