Skip to content

Commit

Permalink
Revert "don't emulate 60hz vblank on 60hz monitor"
Browse files Browse the repository at this point in the history
This reverts commit 95a5f72.
  • Loading branch information
FunkyFr3sh committed Nov 2, 2024
1 parent 9313a99 commit ca08dd6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion inc/dd.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ typedef struct CNCDDRAW
DWORD gui_thread_id;
BOOL show_driver_warning;
BOOL windowed_hack;
BOOL wait_for_real_vblank;

struct
{
Expand Down
10 changes: 1 addition & 9 deletions src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,6 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
g_config.fullscreen = FALSE;
}
}
else if (g_config.maxgameticks == 0)
{
// no need to emulate 60hz vblank if we got a 60hz monitor
if (g_ddraw.mode.dmDisplayFrequency == 60 || g_ddraw.mode.dmDisplayFrequency == 59)
{
g_ddraw.wait_for_real_vblank = TRUE;
}
}
}

BOOL zooming = g_ddraw.zoom.enabled;
Expand Down Expand Up @@ -1566,7 +1558,7 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)

HRESULT dd_WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
{
if (g_config.maxgameticks == -2 || g_ddraw.wait_for_real_vblank)
if (g_config.maxgameticks == -2)
{
/* Workaround for DwmFlush() freeze (e.g. slow alt+tab) issue on windows 7 SP1 */
if (g_ddraw.renderer == ogl_render_main && !IsWine() && !IsWindows8OrGreater())
Expand Down

0 comments on commit ca08dd6

Please sign in to comment.