[Scummvm-git-logs] scummvm branch-2-8 -> 34eb58074f7f3cf6eca4e50bababf5fa4e70f8ab
sev-
noreply at scummvm.org
Sat Jan 20 19:19:59 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1d472ce32b SDL: Print reported DPI info for Mac and SDL in the same format
34eb58074f GUI: Added more GUI scale values
Commit: 1d472ce32bac16f96f755be68e6e6ebb1c6be0df
https://github.com/scummvm/scummvm/commit/1d472ce32bac16f96f755be68e6e6ebb1c6be0df
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-01-20T20:17:01+01:00
Commit Message:
SDL: Print reported DPI info for Mac and SDL in the same format
Changed paths:
backends/platform/sdl/macosx/macosx-window.mm
backends/platform/sdl/sdl-window.cpp
diff --git a/backends/platform/sdl/macosx/macosx-window.mm b/backends/platform/sdl/macosx/macosx-window.mm
index 7a53fd36921..d8481eaee46 100644
--- a/backends/platform/sdl/macosx/macosx-window.mm
+++ b/backends/platform/sdl/macosx/macosx-window.mm
@@ -31,8 +31,10 @@ float SdlWindow_MacOSX::getDpiScalingFactor() const {
SDL_SysWMinfo wmInfo;
if (getSDLWMInformation(&wmInfo)) {
NSWindow *nswindow = wmInfo.info.cocoa.window;
- if ([nswindow respondsToSelector:@selector(backingScaleFactor)])
+ if ([nswindow respondsToSelector:@selector(backingScaleFactor)]) {
+ debug(4, "Reported DPI ratio: %g", [nswindow backingScaleFactor]);
return [nswindow backingScaleFactor];
+ }
}
#endif
diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index 864bb2a45f2..72b8e9bd710 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -291,8 +291,8 @@ void SdlWindow::getDisplayDpi(float *dpi, float *defaultDpi) const {
float SdlWindow::getDpiScalingFactor() const {
float dpi, defaultDpi;
getDisplayDpi(&dpi, &defaultDpi);
- debug(4, "dpi: %g default: %g", dpi, defaultDpi);
float ratio = dpi / defaultDpi;
+ debug(4, "Reported DPI: %g default: %g, ratio %g, clipped: %g", dpi, defaultDpi, ratio, CLIP(ratio, 1.0f, 4.0f));
// Getting the DPI can be unreliable, so clamp the scaling factor to make sure
// we do not return unreasonable values.
return CLIP(ratio, 1.0f, 4.0f);
Commit: 34eb58074f7f3cf6eca4e50bababf5fa4e70f8ab
https://github.com/scummvm/scummvm/commit/34eb58074f7f3cf6eca4e50bababf5fa4e70f8ab
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-01-20T20:19:43+01:00
Commit Message:
GUI: Added more GUI scale values
Should we add a slider perhaps?
Changed paths:
gui/options.cpp
diff --git a/gui/options.cpp b/gui/options.cpp
index 0e7cd22818c..6c5aa62fb0c 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -150,6 +150,10 @@ static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("E
static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
static const char *guiBaseLabels[] = {
+ // I18N: Extremely large GUI scale
+ _s("Extremely large"),
+ // I18N: Very very large GUI scale
+ _s("Very very large"),
// I18N: Very large GUI scale
_s("Very large"),
// I18N: Large GUI scale
@@ -158,9 +162,13 @@ static const char *guiBaseLabels[] = {
_s("Medium"),
// I18N: Small GUI scale
_s("Small"),
+ // I18N: Smaller GUI scale
+ _s("Smaller"),
+ // I18N: Smallest GUI scale
+ _s("Smallest"),
nullptr
};
-static const int guiBaseValues[] = { 150, 125, 100, 75, -1 };
+static const int guiBaseValues[] = { 200, 175, 150, 125, 100, 75, 50, 25, -1 };
// The keyboard mouse speed values range from 0 to 7 and correspond to speeds shown in the label
// "10" (value 3) is the default speed corresponding to the speed before introduction of this control
More information about the Scummvm-git-logs
mailing list