Skip to content

Commit

Permalink
be a bit more flexible with the display frequencies we'll match
Browse files Browse the repository at this point in the history
  • Loading branch information
dukeeeey committed Dec 19, 2022
1 parent 2560451 commit ad0aed4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Src/OSD/SDL/Main.cpp
Expand Up @@ -201,12 +201,14 @@ static void SetFullScreenRefreshRate()
return;
}

if (SDL_BITSPERPIXEL(mode.format) >= 24 && mode.refresh_rate == 58 && mode.w == totalXRes && mode.h == totalYRes) {
int result = SDL_SetWindowDisplayMode(s_window, &mode);
if (result == 0) {
printf("Custom fullscreen mode set: %ix%i@57.524 Hz\n", mode.w, mode.h);
if (SDL_BITSPERPIXEL(mode.format) >= 24 && mode.w == totalXRes && mode.h == totalYRes) {
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);
}
break;
}
break;
}
}
}
Expand Down

0 comments on commit ad0aed4

Please sign in to comment.