aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorBastien Bouclet2017-11-29 21:01:47 +0100
committerColin Snover2017-11-29 16:49:32 -0600
commit779b97ee3fb94cd2c80118febd6b451d454a7c54 (patch)
tree7e61399214efd89d22988ccf37876a1d47f342e8 /backends
parentaa8e983f27f169ddea5cdd9c8054991f6f56456d (diff)
downloadscummvm-rg350-779b97ee3fb94cd2c80118febd6b451d454a7c54.tar.gz
scummvm-rg350-779b97ee3fb94cd2c80118febd6b451d454a7c54.tar.bz2
scummvm-rg350-779b97ee3fb94cd2c80118febd6b451d454a7c54.zip
SDL: Don't use the window size hint for fullscreen
Prevents the opengl backend from changing mode when entering fullscreen for games with a window size hint. Fixes #10335. Closes gh-1074.
Diffstat (limited to 'backends')
-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)) {