Including SDL_config_iphoneos.h enables MFI controller code

This commit is contained in:
Sam Lantinga 2020-11-24 06:55:33 -08:00
parent eba069eaf0
commit c63bbb06e9
4 changed files with 6 additions and 12 deletions

0
Xcode/SDL/SDL.xcodeproj/project.pbxproj Normal file → Executable file
View File

View File

@ -198,11 +198,6 @@
/* enable iOS extended launch screen */ /* enable iOS extended launch screen */
#define SDL_IPHONE_LAUNCHSCREEN 1 #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 */ /* enable filesystem support */
#define SDL_FILESYSTEM_COCOA 1 #define SDL_FILESYSTEM_COCOA 1

View File

@ -105,6 +105,11 @@ typedef enum
SDL_JOYSTICK_POWER_MAX SDL_JOYSTICK_POWER_MAX
} SDL_JoystickPowerLevel; } 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 */ /* Function prototypes */

View File

@ -21,13 +21,6 @@
#include "../../SDL_internal.h" #include "../../SDL_internal.h"
/* This is the iOS implementation of the SDL joystick API */ /* 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_assert.h"
#include "SDL_events.h" #include "SDL_events.h"
#include "SDL_joystick.h" #include "SDL_joystick.h"
@ -37,6 +30,7 @@
#include "../SDL_joystick_c.h" #include "../SDL_joystick_c.h"
#include "../usb_ids.h" #include "../usb_ids.h"
#include "SDL_mfijoystick_c.h"
#if !SDL_EVENTS_DISABLED #if !SDL_EVENTS_DISABLED
#include "../../events/SDL_events_c.h" #include "../../events/SDL_events_c.h"