Skip to content

Commit

Permalink
iOS/tvOS: fix support for SDL_GameControllerGetButton(controller, GUI…
Browse files Browse the repository at this point in the history
…DE) with MFi controllers (thanks Caleb!)

Fixes bug #4463.
  • Loading branch information
slime73 committed Jan 31, 2019
1 parent e5d194e commit 65e07b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/joystick/iphoneos/SDL_sysjoystick.m
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -583,6 +585,7 @@
Uint8 buttons[] = {
gamepad.buttonA.isPressed,
gamepad.buttonX.isPressed,
joystick->delayed_guide_button,
};

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

0 comments on commit 65e07b3

Please sign in to comment.