Files
romm/frontend
Georges-Antoine Assi 37af026d21 fix(emulatorjs): release axis-mapped buttons when the axis skips zero (#5837)
EmulatorJS 4.2.3 releases a button mapped to an axis direction only when
the axis reads 0. A trigger that rests at -1 and reads +1 when pressed
jumps straight back to -1, so the button stays held.

Wrap the bound axischanged listener from the EJS_emulator trap: when an
axis jumps between opposite directions, dispatch a 0 reading first so
every button on that axis is released before the real reading presses
the one it points at. This mirrors EmulatorJS#1198, which is only in
4.3.0-pre. Builds that send oldValue (nightly, used for netplay) already
handle the skip and pass through untouched.

Fixes #5778

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:18:33 -05:00
..
2026-05-30 20:53:52 -04:00