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)
|
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);
|
TRACE("iface %p, status %p.\n", iface, status);
|
||||||
|
|
||||||
/* This looks sane, the MSDN suggests it too */
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
|
||||||
if(!status)
|
if(!status)
|
||||||
{
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
|
||||||
|
|
||||||
*status = This->fake_vblank;
|
*status = fake_vblank;
|
||||||
This->fake_vblank = !This->fake_vblank;
|
fake_vblank = !fake_vblank;
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,6 @@ struct IDirectDrawImpl
|
||||||
BOOL d3d_initialized;
|
BOOL d3d_initialized;
|
||||||
|
|
||||||
/* Misc ddraw fields */
|
/* Misc ddraw fields */
|
||||||
BOOL fake_vblank;
|
|
||||||
BOOL initialized;
|
BOOL initialized;
|
||||||
|
|
||||||
/* DirectDraw things, which are not handled by WineD3D */
|
/* DirectDraw things, which are not handled by WineD3D */
|
||||||
|
|
Loading…
Reference in New Issue