mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
We must explicitly call SDL_SetWindowFullscreen after setting the display mode otherwise the refresh rate doesn't change.
This commit is contained in:
parent
ad0aed42a4
commit
6dcf144694
|
@ -204,9 +204,12 @@ static void SetFullScreenRefreshRate()
|
||||||
if (SDL_BITSPERPIXEL(mode.format) >= 24 && mode.w == totalXRes && mode.h == totalYRes) {
|
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,
|
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
|
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) {
|
if (result == 0) {
|
||||||
printf("Custom fullscreen mode set: %ix%i@57.524 Hz\n", mode.w, mode.h);
|
printf("Custom fullscreen mode set: %ix%i@57.524 Hz\n", mode.w, mode.h);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue