Skip to content
Permalink
Browse files

iOS/tvOS: fix support for SDL_GameControllerGetButton(controller, GUI…

…DE) with MFi controllers (thanks Caleb!)

Fixes bug #4463.
  • Loading branch information
slime73 committed Jan 31, 2019
1 parent e5d194e commit 65e07b38842acc74f7740247074c9962701f0ab4
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/joystick/iphoneos/SDL_sysjoystick.m
@@ -530,6 +530,7 @@
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 @@
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 @@
Uint8 buttons[] = {
gamepad.buttonA.isPressed,
gamepad.buttonX.isPressed,
joystick->delayed_guide_button,
};

for (i = 0; i < SDL_arraysize(buttons); i++) {

0 comments on commit 65e07b3

Please sign in to comment.