iOS MFi game controllers: inverted the thumbstick y axis values to match the behavior of other controllers.
parent
cef2242025
commit
7ce64372c8
|
@ -462,10 +462,10 @@ SDL_SYS_MFIJoystickUpdate(SDL_Joystick * joystick)
|
||||||
|
|
||||||
/* Axis order matches the XInput Windows mappings. */
|
/* Axis order matches the XInput Windows mappings. */
|
||||||
SDL_PrivateJoystickAxis(joystick, 0, (Sint16) (gamepad.leftThumbstick.xAxis.value * 32767));
|
SDL_PrivateJoystickAxis(joystick, 0, (Sint16) (gamepad.leftThumbstick.xAxis.value * 32767));
|
||||||
SDL_PrivateJoystickAxis(joystick, 1, (Sint16) (gamepad.leftThumbstick.yAxis.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 * 32767));
|
||||||
SDL_PrivateJoystickAxis(joystick, 3, (Sint16) (gamepad.rightThumbstick.xAxis.value * 32767));
|
SDL_PrivateJoystickAxis(joystick, 3, (Sint16) (gamepad.rightThumbstick.xAxis.value * 32767));
|
||||||
SDL_PrivateJoystickAxis(joystick, 4, (Sint16) (gamepad.rightThumbstick.yAxis.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 * 32767));
|
||||||
|
|
||||||
hatstate = SDL_SYS_MFIJoystickHatStateForDPad(gamepad.dpad);
|
hatstate = SDL_SYS_MFIJoystickHatStateForDPad(gamepad.dpad);
|
||||||
|
|
Loading…
Reference in New Issue