grafX2/3rdparty/SDL2-NSOSVersion.patch
2020-12-11 20:51:33 +01:00

17 lines
865 B
Diff

--- SDL2-2.0.12.orig/src/video/cocoa/SDL_cocoawindow.m 2020-03-11 02:36:18.000000000 +0100
+++ SDL2-2.0.12/src/video/cocoa/SDL_cocoawindow.m 2020-12-10 23:14:27.000000000 +0100
@@ -1813,6 +1813,13 @@
This is no longer needed as of Mac OS X 10.15, according to bug 4822.
*/
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 /* NSOperatingSystemVersion added in the 10.10 SDK */
+ typedef struct {
+ NSInteger majorVersion;
+ NSInteger minorVersion;
+ NSInteger patchVersion;
+ } NSOperatingSystemVersion;
+#endif
NSOperatingSystemVersion version = { 10, 15, 0 };
if (![processInfo respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)] ||
![processInfo isOperatingSystemAtLeastVersion:version]) {