Commit 1fd548b67ac3eb3e98897c89da283f3829cf47f5

Sam Lantinga 2020-03-23T11:42:44

Fixed building back to Mac OSX using the 10.7 SDK

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index b5b1952..297fef0 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -1813,6 +1813,13 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
            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]) {