[Scummvm-git-logs] scummvm branch-2-5 -> 62f70e0f21c33b8c21c6d6ac3ddbc58864fe58f3
criezy
criezy at scummvm.org
Mon Oct 11 18:44:54 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:
62f70e0f21 SDL: Fix building/deployment on macOS <10.7
Commit: 62f70e0f21c33b8c21c6d6ac3ddbc58864fe58f3
https://github.com/scummvm/scummvm/commit/62f70e0f21c33b8c21c6d6ac3ddbc58864fe58f3
Author: Evan Miller (emmiller at gmail.com)
Date: 2021-10-11T19:44:46+01:00
Commit Message:
SDL: Fix building/deployment on macOS <10.7
NSWindow.backingScaleFactor needs OS support, so a run-time test is
necessary in addition to the OS X SDK guard.
Changed paths:
backends/platform/sdl/macosx/macosx-compat.h
backends/platform/sdl/macosx/macosx-window.mm
diff --git a/backends/platform/sdl/macosx/macosx-compat.h b/backends/platform/sdl/macosx/macosx-compat.h
index 499903a1d0..464b24d589 100644
--- a/backends/platform/sdl/macosx/macosx-compat.h
+++ b/backends/platform/sdl/macosx/macosx-compat.h
@@ -33,6 +33,10 @@
#define MAC_OS_X_VERSION_10_6 1060
#endif
+#ifndef MAC_OS_X_VERSION_10_7
+#define MAC_OS_X_VERSION_10_7 1070
+#endif
+
#ifndef MAC_OS_X_VERSION_10_10
#define MAC_OS_X_VERSION_10_10 101000
#endif
diff --git a/backends/platform/sdl/macosx/macosx-window.mm b/backends/platform/sdl/macosx/macosx-window.mm
index 88e87880c3..e4fb29cfb5 100644
--- a/backends/platform/sdl/macosx/macosx-window.mm
+++ b/backends/platform/sdl/macosx/macosx-window.mm
@@ -24,6 +24,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/platform/sdl/macosx/macosx-window.h"
+#include "backends/platform/sdl/macosx/macosx-compat.h"
#include <AppKit/NSWindow.h>
float SdlWindow_MacOSX::getDpiScalingFactor() const {
@@ -31,7 +32,7 @@ float SdlWindow_MacOSX::getDpiScalingFactor() const {
SDL_SysWMinfo wmInfo;
if (getSDLWMInformation(&wmInfo)) {
NSWindow *nswindow = wmInfo.info.cocoa.window;
- if (nswindow)
+ if ([nswindow respondsToSelector:@selector(backingScaleFactor)])
return [nswindow backingScaleFactor];
}
#endif
More information about the Scummvm-git-logs
mailing list