iOS/tvOS: fix support for SDL_GameControllerGetButton(controller, GUIDE) with MFi controllers (thanks Caleb!)

Fixes bug #4463.
This commit is contained in:
Alex Szpakowski 2019-01-31 19:52:47 -04:00
parent e5d194e902
commit 65e07b3884
1 changed files with 3 additions and 0 deletions

View File

@ -530,6 +530,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
gamepad.leftShoulder.isPressed,
gamepad.rightShoulder.isPressed,
joystick->delayed_guide_button,
};
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
@ -557,6 +558,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
gamepad.leftShoulder.isPressed,
gamepad.rightShoulder.isPressed,
joystick->delayed_guide_button,
};
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
@ -583,6 +585,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick * joystick)
Uint8 buttons[] = {
gamepad.buttonA.isPressed,
gamepad.buttonX.isPressed,
joystick->delayed_guide_button,
};
for (i = 0; i < SDL_arraysize(buttons); i++) {