Procházet zdrojové kódy

Including SDL_config_iphoneos.h enables MFI controller code

Sam Lantinga před 4 roky
rodič
revize
c63bbb06e9

+ 0 - 5
Xcode/SDL/SDL.xcodeproj/project.pbxproj

@@ -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
 

+ 5 - 0
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 */
 

+ 1 - 7
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"