[Scummvm-git-logs] scummvm master -> 779b97ee3fb94cd2c80118febd6b451d454a7c54

csnover csnover at users.noreply.github.com
Wed Nov 29 23:49:52 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
779b97ee3f SDL: Don't use the window size hint for fullscreen


Commit: 779b97ee3fb94cd2c80118febd6b451d454a7c54
    https://github.com/scummvm/scummvm/commit/779b97ee3fb94cd2c80118febd6b451d454a7c54
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-11-29T16:49:32-06:00

Commit Message:
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.

Changed paths:
    backends/graphics/sdl/sdl-graphics.cpp


diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 336b16a..1e37310 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)) {





More information about the Scummvm-git-logs mailing list