iOS/tvOS: fix support for SDL_GameControllerGetButton(controller, GUIDE) with MFi controllers (thanks Caleb!)
authorAlex Szpakowski <slime73@gmail.com>
Thu, 31 Jan 2019 19:52:47 -0400
changeset 125881fc2169984ad
parent 12587 b2d4dcb4ba33
child 12589 85bc5436a005
iOS/tvOS: fix support for SDL_GameControllerGetButton(controller, GUIDE) with MFi controllers (thanks Caleb!)
Fixes bug #4463.
src/joystick/iphoneos/SDL_sysjoystick.m
     1.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m	Thu Jan 31 11:45:31 2019 +0100
     1.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Thu Jan 31 19:52:47 2019 -0400
     1.3 @@ -530,6 +530,7 @@
     1.4                  gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
     1.5                  gamepad.leftShoulder.isPressed,
     1.6                  gamepad.rightShoulder.isPressed,
     1.7 +                joystick->delayed_guide_button,
     1.8              };
     1.9  
    1.10              hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
    1.11 @@ -557,6 +558,7 @@
    1.12                  gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
    1.13                  gamepad.leftShoulder.isPressed,
    1.14                  gamepad.rightShoulder.isPressed,
    1.15 +                joystick->delayed_guide_button,
    1.16              };
    1.17  
    1.18              hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
    1.19 @@ -583,6 +585,7 @@
    1.20              Uint8 buttons[] = {
    1.21                  gamepad.buttonA.isPressed,
    1.22                  gamepad.buttonX.isPressed,
    1.23 +                joystick->delayed_guide_button,
    1.24              };
    1.25  
    1.26              for (i = 0; i < SDL_arraysize(buttons); i++) {