tweak fake output of GetVerticalBlankStatus

This commit is contained in:
FunkyFr3sh 2024-08-29 11:41:31 +02:00
parent a8dfbff1f2
commit 8fe9a9370c
2 changed files with 26 additions and 13 deletions

View file

@ -587,6 +587,27 @@ HRESULT dd_GetMonitorFrequency(LPDWORD lpdwFreq)
return DD_OK;
}
HRESULT dd_GetVerticalBlankStatus(LPBOOL lpbIsInVB)
{
if (!lpbIsInVB)
return DDERR_INVALIDPARAMS;
static DWORD last_vb;
DWORD tick = GetTickCount();
if (last_vb + 16 > tick)
{
*lpbIsInVB = FALSE;
}
else
{
last_vb = tick;
*lpbIsInVB = TRUE;
}
return DD_OK;
}
HRESULT dd_RestoreDisplayMode()
{
if (!g_ddraw.render.run)
@ -1685,14 +1706,6 @@ HRESULT dd_GetAvailableVidMem(LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpd
return DD_OK;
}
HRESULT dd_GetVerticalBlankStatus(LPBOOL lpbIsInVB)
{
if (lpbIsInVB)
*lpbIsInVB = TRUE;
return DD_OK;
}
HRESULT dd_TestCooperativeLevel()
{
if (g_config.limiter_type == LIMIT_TESTCOOP && g_ddraw.ticks_limiter.tick_length > 0)