From 01a462e9d42424671519c24837759c5aea575a93 Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Sun, 4 Feb 2024 00:43:05 +0800 Subject: [PATCH] Fix the default controller axes on Linux. The third axis is actually the Left Trigger, which causes the player to uncontrollably look upwards. Fixed by mapping said axis to nothing. --- src/common/platform/posix/sdl/i_joystick.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/platform/posix/sdl/i_joystick.cpp b/src/common/platform/posix/sdl/i_joystick.cpp index 3ff0cc169b..a7eb59568b 100644 --- a/src/common/platform/posix/sdl/i_joystick.cpp +++ b/src/common/platform/posix/sdl/i_joystick.cpp @@ -268,7 +268,9 @@ protected: friend class SDLInputJoystickManager; }; -const EJoyAxis SDLInputJoystick::DefaultAxes[5] = {JOYAXIS_Side, JOYAXIS_Forward, JOYAXIS_Pitch, JOYAXIS_Yaw, JOYAXIS_Up}; + +// [Nash 4 Feb 2024] seems like on Linux, the third axis is actually the Left Trigger, resulting in the player uncontrollably looking upwards. +const EJoyAxis SDLInputJoystick::DefaultAxes[5] = {JOYAXIS_Side, JOYAXIS_Forward, JOYAXIS_None, JOYAXIS_Yaw, JOYAXIS_Pitch}; class SDLInputJoystickManager {