From 1e943e2ad248bf5b5be4993b30c5528816950056 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <slouken@libsdl.org>
Date: Mon, 23 Nov 2020 22:59:22 -0800
Subject: [PATCH] Fixed building with an older SDK and macOS target

---
 include/SDL_config_macosx.h             | 2 +-
 src/joystick/iphoneos/SDL_mfijoystick.m | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h
index 7ec8095df..4b45f1658 100644
--- a/include/SDL_config_macosx.h
+++ b/include/SDL_config_macosx.h
@@ -147,7 +147,7 @@
 #define SDL_HAPTIC_IOKIT    1
 
 /* The MFI controller support requires ARC Objective C runtime */
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
 #define SDL_JOYSTICK_MFI 1
 #endif
 
diff --git a/src/joystick/iphoneos/SDL_mfijoystick.m b/src/joystick/iphoneos/SDL_mfijoystick.m
index efdee5096..f111d5d04 100644
--- a/src/joystick/iphoneos/SDL_mfijoystick.m
+++ b/src/joystick/iphoneos/SDL_mfijoystick.m
@@ -42,7 +42,7 @@
 #include "../../events/SDL_events_c.h"
 #endif
 
-#if !TARGET_OS_TV && !TARGET_OS_OSX
+#if TARGET_OS_IOS
 #define SDL_JOYSTICK_iOS_ACCELEROMETER
 #import <CoreMotion/CoreMotion.h>
 #endif