From 6dcf14469445688621020df72cc59d39b5458429 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Sat, 24 Dec 2022 17:29:08 +0000 Subject: [PATCH] We must explicitly call SDL_SetWindowFullscreen after setting the display mode otherwise the refresh rate doesn't change. --- Src/OSD/SDL/Main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 239ecd8..2d4c357 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -205,7 +205,10 @@ static void SetFullScreenRefreshRate() if (mode.refresh_rate == 57 || mode.refresh_rate == 58) { // nvidia is fairly flexible in what refresh rate windows will show, so we can match either 57 or 58, int result = SDL_SetWindowDisplayMode(s_window, &mode); // both are totally non standard frequencies and shouldn't be set incorrectly if (result == 0) { - printf("Custom fullscreen mode set: %ix%i@57.524 Hz\n", mode.w, mode.h); + result = SDL_SetWindowFullscreen(s_window, SDL_WINDOW_FULLSCREEN); + if (result == 0) { + printf("Custom fullscreen mode set: %ix%i@57.524 Hz\n", mode.w, mode.h); + } } break; }