Commit c456034
committed
fix(v2): stop gamepad B/cancel from backing out of controller test and games
The global useGamepad loop translated every button into a built-in
action regardless of context. On the controller-test screen this meant
pressing B (or Circle / Nintendo-A, which share the standard B index)
fired "back" and left the page before the press could be inspected. The
same happened while a game was running: the emulator owns the pad, but
useGamepad still ran "back" on B and quit the game.
Suppress the built-in translation in two contexts:
- While a game is running (storePlaying.playing), so the emulator owns
the pad entirely.
- On the controller-test route, so every button can be pressed and
inspected in place.
Because the test screen no longer exits on B, ControllerDebug owns its
own escape: hold a back button (B / Circle or Back / Share) for 700ms to
navigate away, with an on-screen hint and a fill indicator. A short tap
just registers in the inspector.
Fixes #3591
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EdiAR2HMM5pCMVfn2Zhbrx1 parent a5e3150 commit c456034
20 files changed
Lines changed: 132 additions & 20 deletions
File tree
- frontend/src
- locales
- bg_BG
- cs_CZ
- de_DE
- en_GB
- en_US
- es_ES
- fr_FR
- hu_HU
- it_IT
- ja_JP
- ko_KR
- pl_PL
- pt_BR
- ro_RO
- ru_RU
- tr_TR
- zh_CN
- zh_TW
- v2
- composables/useGamepad
- views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
0 commit comments