[Scummvm-git-logs] scummvm master -> 10a7b42587645e8c3ac22b5055e8db93285910ae

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:
dd6c7be8fa SDL: Print reported DPI info for Mac and SDL in the same format
10a7b42587 GUI: Added more GUI scale values


Commit: dd6c7be8fafc17b78e9c0a8dcfecd31198cfac79
    https://github.com/scummvm/scummvm/commit/dd6c7be8fafc17b78e9c0a8dcfecd31198cfac79
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-01-20T20:07:57+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: 10a7b42587645e8c3ac22b5055e8db93285910ae
    https://github.com/scummvm/scummvm/commit/10a7b42587645e8c3ac22b5055e8db93285910ae
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-01-20T20:15:59+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 5add84ddac3..87b3bb4ed0d 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -150,6 +150,10 @@ static const char *const savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"),
 static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
 
 static const char *const 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 *const 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