|
@@ -378,6 +378,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|
|
NSLog(@"Product name: %@\n", controller.vendorName);
|
|
|
NSLog(@"Product category: %@\n", controller.productCategory);
|
|
|
NSLog(@"Elements available:\n");
|
|
|
+#ifdef ENABLE_PHYSICAL_INPUT_PROFILE
|
|
|
if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) {
|
|
|
NSDictionary<NSString *, GCControllerElement *> *elements = controller.physicalInputProfile.elements;
|
|
|
for (id key in controller.physicalInputProfile.buttons) {
|
|
@@ -390,6 +391,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|
|
NSLog(@"\tHat: %@\n", key);
|
|
|
}
|
|
|
}
|
|
|
+#endif
|
|
|
#endif
|
|
|
|
|
|
device->is_xbox = IsControllerXbox(controller);
|
|
@@ -1109,7 +1111,7 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
|
|
|
Uint8 hatstate = SDL_HAT_CENTERED;
|
|
|
int i;
|
|
|
|
|
|
-#ifdef DEBUG_CONTROLLER_STATE
|
|
|
+#if defined(DEBUG_CONTROLLER_STATE) && defined(ENABLE_PHYSICAL_INPUT_PROFILE)
|
|
|
if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) {
|
|
|
if (controller.physicalInputProfile) {
|
|
|
for (id key in controller.physicalInputProfile.buttons) {
|
|
@@ -1136,6 +1138,7 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
|
|
|
}
|
|
|
#endif /* DEBUG_CONTROLLER_STATE */
|
|
|
|
|
|
+#ifdef ENABLE_PHYSICAL_INPUT_PROFILE
|
|
|
if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) {
|
|
|
NSDictionary<NSString *, GCControllerElement *> *elements = controller.physicalInputProfile.elements;
|
|
|
NSDictionary<NSString *, GCControllerButtonInput *> *buttons = controller.physicalInputProfile.buttons;
|
|
@@ -1162,7 +1165,9 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
|
|
|
}
|
|
|
SDL_PrivateJoystickButton(joystick, button++, value);
|
|
|
}
|
|
|
- } else if (controller.extendedGamepad) {
|
|
|
+ } else
|
|
|
+#endif
|
|
|
+ if (controller.extendedGamepad) {
|
|
|
SDL_bool isstack;
|
|
|
GCExtendedGamepad *gamepad = controller.extendedGamepad;
|
|
|
|