Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
ios: Fixed MFi guide button not being detected (thanks, Caleb!).
- Loading branch information
Showing
with
3 additions
and
0 deletions.
-
+3
−0
src/joystick/iphoneos/SDL_sysjoystick.m
|
@@ -658,6 +658,7 @@ @interface GCMicroGamepad (SDL) |
|
|
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) { |
|
|
if (joystick->hwdata->uses_pause_handler) { |
|
|
pause_button_index = button_count; |
|
|
buttons[button_count++] = joystick->delayed_guide_button; |
|
|
} else { |
|
|
buttons[button_count++] = gamepad.buttonMenu.isPressed; |
|
|
} |
|
@@ -693,6 +694,7 @@ @interface GCMicroGamepad (SDL) |
|
|
buttons[button_count++] = gamepad.leftShoulder.isPressed; |
|
|
buttons[button_count++] = gamepad.rightShoulder.isPressed; |
|
|
pause_button_index = button_count; |
|
|
buttons[button_count++] = joystick->delayed_guide_button; |
|
|
|
|
|
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad); |
|
|
|
|
@@ -725,6 +727,7 @@ @interface GCMicroGamepad (SDL) |
|
|
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) { |
|
|
if (joystick->hwdata->uses_pause_handler) { |
|
|
pause_button_index = button_count; |
|
|
buttons[button_count++] = joystick->delayed_guide_button; |
|
|
} else { |
|
|
buttons[button_count++] = gamepad.buttonMenu.isPressed; |
|
|
} |
|
|