Commit 8173e6f5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Just use a static variable for vblank emulation.

parent 60f6c41a
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment