Files
romm/frontend
Georges-Antoine Assi bee00457e9 fix(v2): ignore phantom/non-standard gamepads in nav polling
The v2 gamepad polling loop reads buttons and axes by hardcoded W3C
standard-mapping indices, but only guarded against null pads. Firefox
(and Zen) expose phantom or non-standard-mapping gamepads even with no
real controller attached, whose analog controls drift across the press
threshold. Index 4/5 (LB/RB) are bound to AppNav section cycling, so
each oscillation re-fired cycleSection and looped the app through
home/platforms/collections/search with no user input, making the UI
unusable.

Add an isUsablePad() guard requiring pad.connected and a "standard"
mapping, applied in both the polling loop and detectPadPresence. Every
button/axis read assumes the standard mapping, so a non-standard pad
cannot be interpreted safely regardless.

Fixes #3851

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:54:11 -04:00
..
2026-06-22 10:06:03 -04:00
2025-09-09 20:19:30 -04:00
2026-05-30 20:53:52 -04:00
2026-06-25 17:17:23 -04:00