Skip to content

Commit

Permalink
iOS: Fixed MFi game controller triggers to report the proper range of…
Browse files Browse the repository at this point in the history
… values.
  • Loading branch information
slime73 committed Nov 9, 2015
1 parent 5103ae9 commit 84f6bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/joystick/iphoneos/SDL_sysjoystick.m
Expand Up @@ -463,10 +463,10 @@ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index)
/* Axis order matches the XInput Windows mappings. */
SDL_PrivateJoystickAxis(joystick, 0, (Sint16) (gamepad.leftThumbstick.xAxis.value * 32767));
SDL_PrivateJoystickAxis(joystick, 1, (Sint16) (gamepad.leftThumbstick.yAxis.value * -32767));
SDL_PrivateJoystickAxis(joystick, 2, (Sint16) (gamepad.leftTrigger.value * 32767));
SDL_PrivateJoystickAxis(joystick, 2, (Sint16) ((gamepad.leftTrigger.value * 65535) - 32768));
SDL_PrivateJoystickAxis(joystick, 3, (Sint16) (gamepad.rightThumbstick.xAxis.value * 32767));
SDL_PrivateJoystickAxis(joystick, 4, (Sint16) (gamepad.rightThumbstick.yAxis.value * -32767));
SDL_PrivateJoystickAxis(joystick, 5, (Sint16) (gamepad.rightTrigger.value * 32767));
SDL_PrivateJoystickAxis(joystick, 5, (Sint16) ((gamepad.rightTrigger.value * 65535) - 32768));

hatstate = SDL_SYS_MFIJoystickHatStateForDPad(gamepad.dpad);

Expand Down

0 comments on commit 84f6bc4

Please sign in to comment.