@@ -1955,6 +1955,13 @@ Bitu GFX_SetSize(int width,
1955
1955
retFlags |= GFX_CAN_RANDOM;
1956
1956
}
1957
1957
1958
+ // Re-apply the minimum bounds prior to clipping the
1959
+ // texture-based window because SDL invalidates the prior bounds
1960
+ // in the above changes.
1961
+ SDL_SetWindowMinimumSize (sdl.window ,
1962
+ FALLBACK_WINDOW_DIMENSIONS.x ,
1963
+ FALLBACK_WINDOW_DIMENSIONS.y );
1964
+
1958
1965
// One-time intialize the window size
1959
1966
if (!sdl.desktop .window .adjusted_initial_size ) {
1960
1967
initialize_sdl_window_size (sdl.window ,
@@ -2024,6 +2031,13 @@ Bitu GFX_SetSize(int width,
2024
2031
SDL_GetError ());
2025
2032
}
2026
2033
2034
+ // Re-apply the minimum bounds prior to clipping the OpenGL
2035
+ // window because SDL invalidates the prior bounds in the above
2036
+ // window changes.
2037
+ SDL_SetWindowMinimumSize (sdl.window ,
2038
+ FALLBACK_WINDOW_DIMENSIONS.x ,
2039
+ FALLBACK_WINDOW_DIMENSIONS.y );
2040
+
2027
2041
SetupWindowScaled (SCREEN_OPENGL, sdl.desktop .want_resizable_window );
2028
2042
2029
2043
/* We may simply use SDL_BYTESPERPIXEL
@@ -2270,14 +2284,6 @@ Bitu GFX_SetSize(int width,
2270
2284
}
2271
2285
#endif // C_OPENGL
2272
2286
}
2273
-
2274
- // Always re-apply the minimum size to the updated window instead of
2275
- // checking GetWindowMinumSize, as SDL invalidates the prior set
2276
- // minimums when switching from fullscreen back to windowed.
2277
- SDL_SetWindowMinimumSize (sdl.window ,
2278
- FALLBACK_WINDOW_DIMENSIONS.x ,
2279
- FALLBACK_WINDOW_DIMENSIONS.y );
2280
-
2281
2287
// Ensure mouse emulation knows the current parameters
2282
2288
NewMouseScreenParams ();
2283
2289
update_vsync_state ();
0 commit comments