mirror of https://github.com/encounter/SDL.git
ios: Fixed MFi guide button not being detected (thanks, Caleb!).
Fixes Bugzilla #4721.
This commit is contained in:
parent
70f0b093ff
commit
73536d93ea
|
@ -658,6 +658,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
|
||||||
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
||||||
if (joystick->hwdata->uses_pause_handler) {
|
if (joystick->hwdata->uses_pause_handler) {
|
||||||
pause_button_index = button_count;
|
pause_button_index = button_count;
|
||||||
|
buttons[button_count++] = joystick->delayed_guide_button;
|
||||||
} else {
|
} else {
|
||||||
buttons[button_count++] = gamepad.buttonMenu.isPressed;
|
buttons[button_count++] = gamepad.buttonMenu.isPressed;
|
||||||
}
|
}
|
||||||
|
@ -693,6 +694,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
|
||||||
buttons[button_count++] = gamepad.leftShoulder.isPressed;
|
buttons[button_count++] = gamepad.leftShoulder.isPressed;
|
||||||
buttons[button_count++] = gamepad.rightShoulder.isPressed;
|
buttons[button_count++] = gamepad.rightShoulder.isPressed;
|
||||||
pause_button_index = button_count;
|
pause_button_index = button_count;
|
||||||
|
buttons[button_count++] = joystick->delayed_guide_button;
|
||||||
|
|
||||||
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
|
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
|
||||||
|
|
||||||
|
@ -725,6 +727,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
|
||||||
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
||||||
if (joystick->hwdata->uses_pause_handler) {
|
if (joystick->hwdata->uses_pause_handler) {
|
||||||
pause_button_index = button_count;
|
pause_button_index = button_count;
|
||||||
|
buttons[button_count++] = joystick->delayed_guide_button;
|
||||||
} else {
|
} else {
|
||||||
buttons[button_count++] = gamepad.buttonMenu.isPressed;
|
buttons[button_count++] = gamepad.buttonMenu.isPressed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue