feat: switch gamepad reader to Linux evdev BTN_* codes

The Joystick API (/dev/input/js*) numbers buttons depending on driver
and connection type. Xbox One controllers via Bluetooth with a Share
button shifted X from button number 2 to 3, silently breaking the
mapping.

The evdev interface provides standardized BTN_* codes (BTN_SOUTH=A,
BTN_NORTH=X, etc.) that remain consistent across Xbox, PlayStation,
and Nintendo controllers over both USB and Bluetooth.

js* devices remain the discovery path, while /sys/class/input/jsN is
used to resolve the corresponding event* device. If the /sys lookup
fails, JoystickFallbackReader falls back to the old Joystick API.
This commit is contained in:
Andre
2026-05-11 17:29:54 +02:00
parent 1251cc278a
commit 82ff6dbbf2
9 changed files with 306 additions and 96 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB