Skip to content
Permalink
Browse files

ios: Fixed MFi guide button not being detected (thanks, Caleb!).

Fixes Bugzilla #4721.
  • Loading branch information
icculus committed Jul 13, 2019
1 parent 70f0b09 commit 73536d93ea66c4736e36cc0567a6a41785d9b0be
Showing with 3 additions and 0 deletions.
  1. +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;
}

0 comments on commit 73536d9

Please sign in to comment.