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>