SDL_SetWindowFullscreen isn't needed as we call ResizeGLScreen which sets the fullscreen mode afterwards.

This commit is contained in:
Ian Curtis 2022-12-24 23:54:47 +00:00
parent 6dcf144694
commit 11c01a349f

View file

@ -204,12 +204,9 @@ static void SetFullScreenRefreshRate()
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) {
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;
}
}