[Scummvm-git-logs] scummvm master -> 3fc952a999b91aa1e889824ec6088514d14a0ab2
criezy
criezy at scummvm.org
Sun Aug 30 18:43:02 UTC 2020
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:
3fc952a999 MACOSX: Fix compilation with SDK 10.4 (hopefully)
Commit: 3fc952a999b91aa1e889824ec6088514d14a0ab2
https://github.com/scummvm/scummvm/commit/3fc952a999b91aa1e889824ec6088514d14a0ab2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T19:42:19+01:00
Commit Message:
MACOSX: Fix compilation with SDK 10.4 (hopefully)
Changed paths:
backends/platform/sdl/macosx/appmenu_osx.mm
backends/platform/sdl/macosx/macosx_wrapper.mm
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 74d5d003f5..3fd8a6e26d 100644
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -42,6 +42,16 @@
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
typedef unsigned long NSUInteger;
+
+// Those are not defined in the 10.4 SDK, but they are defined when targetting
+// Mac OS X 10.4 or above in the 10.5 SDK. So hopfully that means it works with 10.4 as well.
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+enum {
+ NSUTF32StringEncoding = 0x8c000100,
+ NSUTF32BigEndianStringEncoding = 0x98000100,
+ NSUTF32LittleEndianStringEncoding = 0x9c000100
+}
+#endif
#endif
// Apple added setAppleMenu in 10.5 and removed it in 10.6.
diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index c30ebe89ba..ed740a67f2 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -25,6 +25,7 @@
#include "backends/platform/sdl/macosx/macosx_wrapper.h"
#include "common/translation.h"
+#include "backends/platform/sdl/macosx/macosx-compat.h"
#include <AppKit/NSPasteboard.h>
#include <Foundation/NSArray.h>
@@ -32,6 +33,20 @@
#include <AvailabilityMacros.h>
#include <CoreFoundation/CFString.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+typedef unsigned long NSUInteger;
+
+// Those are not defined in the 10.4 SDK, but they are defined when targetting
+// Mac OS X 10.4 or above in the 10.5 SDK. So hopfully that means it works with 10.4 as well.
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+enum {
+ NSUTF32StringEncoding = 0x8c000100,
+ NSUTF32BigEndianStringEncoding = 0x98000100,
+ NSUTF32LittleEndianStringEncoding = 0x9c000100
+}
+#endif
+#endif
+
bool hasTextInClipboardMacOSX() {
return [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObject:NSStringPboardType]] != nil;
}
More information about the Scummvm-git-logs
mailing list