DescentDevelopers / Descent3

Descent 3 by Outrage Entertainment
GNU General Public License v3.0
2.86k stars 247 forks source link

[Runtime Issue]: XBox Controller registers triggers as [-1, 1] axes instead of [0, 1] #496

Open tophyr opened 3 months ago

tophyr commented 3 months ago

Build Version

87f6ef00

Operating System Environment

CPU Environment

Game Modes Affected

Game Environment

No response

Description

XBox Controller's "trigger buttons" are continuous-value controls, which are detected (somewhat sensibly) as joystick axes in the game. However, the game assumes that the axis range is both positive and negative, when in reality the trigger should be mapped as a positive-only axis. The result of this is that an untouched trigger is always detected as being the maximally-negative value.

Regression Status

No response

Steps to Reproduce

No response

byteManiak commented 1 month ago

Can confirm it also happens on Linux x86_64

Lgt2x commented 1 month ago

I have an early draft for analog trigger support over at #600 . I don't have an XBox controller at hand but could reproduce with another gamepad (in my case Gamecube controller with adapter). It may need some tuning but the basics should work, if one of you wants to give it a try.