Including SDL_config_iphoneos.h enables MFI controller code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
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 c1c41a8..1c68020 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 4d9ffd6..0bbeafe 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 f111d5d..0f463ca 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"