1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

fix for last commit

This commit is contained in:
FunkyFr3sh 2023-10-02 02:21:20 +02:00
parent bbf529f6ef
commit a95003fbc2
2 changed files with 3 additions and 3 deletions

View File

@ -1191,7 +1191,7 @@ HRESULT dd_WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
{ {
BOOL open = BOOL open =
!(g_config.maxfps < 0 || !(g_config.maxfps < 0 ||
(g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency)); (g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency)));
if (fpsl_dwm_flush() || fpsl_wait_for_vblank(open)) if (fpsl_dwm_flush() || fpsl_wait_for_vblank(open))
return DD_OK; return DD_OK;

View File

@ -126,7 +126,7 @@ void fpsl_frame_start()
void fpsl_frame_end() void fpsl_frame_end()
{ {
if (g_config.maxfps < 0 || if (g_config.maxfps < 0 ||
(g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency)) (g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency)))
{ {
if (fpsl_dwm_flush() || fpsl_wait_for_vblank(TRUE)) if (fpsl_dwm_flush() || fpsl_wait_for_vblank(TRUE))
return; return;
@ -136,7 +136,7 @@ void fpsl_frame_end()
{ {
if (g_fpsl.htimer) if (g_fpsl.htimer)
{ {
if (g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency) if (g_config.vsync && (!g_config.maxfps || g_config.maxfps >= g_ddraw->mode.dmDisplayFrequency))
{ {
WaitForSingleObject(g_fpsl.htimer, g_fpsl.tick_length * 2); WaitForSingleObject(g_fpsl.htimer, g_fpsl.tick_length * 2);
LARGE_INTEGER due_time = { .QuadPart = -g_fpsl.tick_length_ns }; LARGE_INTEGER due_time = { .QuadPart = -g_fpsl.tick_length_ns };