Browse Source

Fixed building on older macOS SDK

Sam Lantinga 8 months ago
parent
commit
e387314a67
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/video/cocoa/SDL_cocoawindow.m

+ 6 - 0
src/video/cocoa/SDL_cocoawindow.m

@@ -64,6 +64,12 @@
 
 @end
 
+@interface NSScreen (SDL)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 120000 /* Added in the 12.0 SDK */
+@property(readonly) NSEdgeInsets safeAreaInsets;
+#endif
+@end
+
 @interface NSWindow (SDL)
 #if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 /* Added in the 10.10 SDK */
 @property(readonly) NSRect contentLayoutRect;