aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/sdl/sdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/sdl/sdl-graphics.cpp')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 336b16a5a1..1e37310ca2 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -244,11 +244,14 @@ bool SdlGraphicsManager::createOrUpdateWindow(int width, int height, const Uint3
// resized the game window), or when the launcher is visible (since a user
// may change the scaler, which should reset the window size)
if (!_window->getSDLWindow() || _lastFlags != flags || _overlayVisible || _allowWindowSizeReset) {
- if (_hintedWidth) {
- width = _hintedWidth;
- }
- if (_hintedHeight) {
- height = _hintedHeight;
+ const bool fullscreen = (flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP)) != 0;
+ if (!fullscreen) {
+ if (_hintedWidth) {
+ width = _hintedWidth;
+ }
+ if (_hintedHeight) {
+ height = _hintedHeight;
+ }
}
if (!_window->createOrUpdateWindow(width, height, flags)) {