You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoystickSDL: Show non-gamepad axes and only show gamepad axes if they are valid
Before it was assuming numGapepadAxes == numJoystickAxes, which cannot be assumed. numGamepadAxes can be less than, equal to, or greater than numJoystickAxes.
Before it was also assuming a joystickAxisId represents the same axis as a gamepadAxisId, which cannot be assumed
ex. A gamepad may map buttons to a gamepad axes, so even if numJoystickAxes == 0 there may still be a gamepad axis
ex. With the SDL gamepad interface, a controller can only have 2 joysticks. Some devices that support the SDL gamepad interface have more than 2 joysticks (ex. UXV SRoC or Steam Controller). The SDL joystick interface supports more than 2 joysticks. A joystick axis may not map to be a gamepad axis.
note: Most controllers do not have the issues fixed with this commit because they are true gamepads and don't have any axes not mapped/represented in the SDL gamepad interface. I tested with a couple popular controllers (x-box 360 controller and a 8bitDo Ultimate C bluetooth controller) and they had no hidden axes. The QGC joystick configuration page for these controllers will have no visible difference before and after this commit
0 commit comments