[Scummvm-git-logs] scummvm master -> aae99da8425e8792817eda33280f0b2c18b3bf17
lotharsm
mail at serra.me
Fri Jul 30 18:48:30 UTC 2021
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:
aae99da842 BACKENDS: OPENGLSDL: Save detected window dimensions to the config file
Commit: aae99da8425e8792817eda33280f0b2c18b3bf17
https://github.com/scummvm/scummvm/commit/aae99da8425e8792817eda33280f0b2c18b3bf17
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-30T20:47:53+02:00
Commit Message:
BACKENDS: OPENGLSDL: Save detected window dimensions to the config file
This prevents undefined behavior if no window dimensions are present in
the ScummVM config file from previous runs.
Changed paths:
backends/graphics/openglsdl/openglsdl-graphics.cpp
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index b99d5d266d..79d02c3afa 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -372,6 +372,11 @@ bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requested
// Apply scaler
requestedWidth *= _graphicsScale;
requestedHeight *= _graphicsScale;
+
+ // Save current window dimensions
+ ConfMan.setInt("last_window_width", requestedWidth, Common::ConfigManager::kApplicationDomain);
+ ConfMan.setInt("last_window_height", requestedHeight, Common::ConfigManager::kApplicationDomain);
+ ConfMan.flushToDisk();
}
// Determine current aspect ratio
More information about the Scummvm-git-logs
mailing list