From c63bbb06e9c0ee3f7f600c701ff70e5ac1cbe51d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 24 Nov 2020 06:55:33 -0800 Subject: [PATCH] Including SDL_config_iphoneos.h enables MFI controller code --- Xcode/SDL/SDL.xcodeproj/project.pbxproj | 0 include/SDL_config_iphoneos.h | 5 ----- include/SDL_joystick.h | 5 +++++ src/joystick/iphoneos/SDL_mfijoystick.m | 8 +------- 4 files changed, 6 insertions(+), 12 deletions(-) mode change 100644 => 100755 Xcode/SDL/SDL.xcodeproj/project.pbxproj diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/include/SDL_config_iphoneos.h b/include/SDL_config_iphoneos.h index c1c41a895..1c68020c1 100644 --- a/include/SDL_config_iphoneos.h +++ b/include/SDL_config_iphoneos.h @@ -198,11 +198,6 @@ /* enable iOS extended launch screen */ #define SDL_IPHONE_LAUNCHSCREEN 1 -/* Set max recognized G-force from accelerometer - See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed - */ -#define SDL_IPHONE_MAX_GFORCE 5.0 - /* enable filesystem support */ #define SDL_FILESYSTEM_COCOA 1 diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h index 4d9ffd6e4..0bbeafe0a 100644 --- a/include/SDL_joystick.h +++ b/include/SDL_joystick.h @@ -105,6 +105,11 @@ typedef enum SDL_JOYSTICK_POWER_MAX } SDL_JoystickPowerLevel; +/* Set max recognized G-force from accelerometer + See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed + */ +#define SDL_IPHONE_MAX_GFORCE 5.0 + /* Function prototypes */ diff --git a/src/joystick/iphoneos/SDL_mfijoystick.m b/src/joystick/iphoneos/SDL_mfijoystick.m index f111d5d04..0f463ca46 100644 --- a/src/joystick/iphoneos/SDL_mfijoystick.m +++ b/src/joystick/iphoneos/SDL_mfijoystick.m @@ -21,13 +21,6 @@ #include "../../SDL_internal.h" /* This is the iOS implementation of the SDL joystick API */ -#include "SDL_mfijoystick_c.h" - -#if !TARGET_OS_OSX -/* needed for SDL_IPHONE_MAX_GFORCE macro */ -#include "../../../include/SDL_config_iphoneos.h" -#endif - #include "SDL_assert.h" #include "SDL_events.h" #include "SDL_joystick.h" @@ -37,6 +30,7 @@ #include "../SDL_joystick_c.h" #include "../usb_ids.h" +#include "SDL_mfijoystick_c.h" #if !SDL_EVENTS_DISABLED #include "../../events/SDL_events_c.h"