[Scummvm-git-logs] scummvm master -> 9fcd67b2a72b321d9a220583a222ca8730ac6e84
criezy
criezy at scummvm.org
Sun Aug 15 08:52:14 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:
9fcd67b2a7 GUI: Never scale the GUI below 320x200
Commit: 9fcd67b2a72b321d9a220583a222ca8730ac6e84
https://github.com/scummvm/scummvm/commit/9fcd67b2a72b321d9a220583a222ca8730ac6e84
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-15T09:52:03+01:00
Commit Message:
GUI: Never scale the GUI below 320x200
Changed paths:
gui/gui-manager.cpp
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index d1808e48db..9bc0786ba0 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -117,6 +117,18 @@ void GuiManager::computeScaleFactor() {
_baseHeight = (int16)((float)h / _scaleFactor);
_baseWidth = (int16)((float)w / _scaleFactor);
+ // Never go below 320x200. Our GUI layout is not designed to go below that.
+ if (_baseHeight < 200) {
+ _baseHeight = 200;
+ _scaleFactor = (float)h / (float)_baseHeight;
+ _baseWidth = (int16)((float)w / _scaleFactor);
+ }
+ if (_baseWidth < 320) {
+ _baseWidth = 320;
+ _scaleFactor = (float)w / (float)_baseWidth;
+ _baseHeight = (int16)((float)h / _scaleFactor);
+ }
+
if (_theme)
_theme->setBaseResolution(_baseWidth, _baseHeight, _scaleFactor);
More information about the Scummvm-git-logs
mailing list