rend_SetPreferredState: allow changing resolution and fullscreen mode at the same time

This commit is contained in:
Louis Gombert
2025-03-21 21:37:10 +01:00
parent 05f9fce0b5
commit b976846b09
2 changed files with 10 additions and 10 deletions

View File

@@ -443,7 +443,7 @@ int opengl_Setup(oeApplication *app, const int *width, const int *height) {
SDL_SetWindowRelativeMouseMode(GSDLWindow, grabMouse);
SDL_SetWindowKeyboardGrab(GSDLWindow, grabMouse);
SDL_SetWindowFullscreen(GSDLWindow, Game_fullscreen);
rend_SetFullScreen(Game_fullscreen);
} else if (!Game_fullscreen) {
SDL_SetWindowSize(GSDLWindow, winw, winh);
}
@@ -1140,6 +1140,7 @@ void rend_SetGammaValue(float val) {
void rend_SetFullScreen(bool fullscreen) {
if (GSDLWindow) {
SDL_SetWindowFullscreen(GSDLWindow, fullscreen);
SDL_SyncWindow(GSDLWindow);
}
if (fullscreen) {