浏览代码

SDL_mfijoystick.m: fix build with Xcode < 9

Fixes #6601.

(cherry picked from commit 53ca1f77029289a58f1a9963a00b637b903f494d)
Joshua Root 2 年之前
父节点
当前提交
9925ee52d7
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/joystick/iphoneos/SDL_mfijoystick.m

+ 5 - 0
src/joystick/iphoneos/SDL_mfijoystick.m

@@ -639,11 +639,16 @@ static int
 IOS_JoystickInit(void)
 {
 #if defined(__MACOSX__)
+#if _SDL_HAS_BUILTIN(__builtin_available)
     if (@available(macOS 10.16, *)) {
         /* Continue with initialization on macOS 11+ */
     } else {
         return 0;
     }
+#else
+    /* No @available, must be an older macOS version */
+    return 0;
+#endif
 #endif
 
     @autoreleasepool {