From 66620bd1082be97e8d59257895182fc5c2172b52 Mon Sep 17 00:00:00 2001
From: Joshua Root <[EMAIL REDACTED]>
Date: Sun, 28 Aug 2022 00:52:19 +1000
Subject: [PATCH] Check build-time SDK in LoadMainMenuNibIfAvailable
Fixes building against OS X 10.7 SDK.
(cherry picked from commit f8cebeea599ae65f36d388257a9d9a8ed8ada576)
---
src/video/cocoa/SDL_cocoaevents.m | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index 4903a8a040e4..ed2aaa6c62dd 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -333,6 +333,7 @@ - (void)handleURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEv
static bool
LoadMainMenuNibIfAvailable(void)
{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
NSDictionary *infoDict;
NSString *mainNibFileName;
bool success = false;
@@ -350,6 +351,9 @@ - (void)handleURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEv
}
return success;
+#else
+ return false;
+#endif
}
static void