fix(v2): stop gamepad B/cancel from backing out of controller test and games#3604
Open
gantoine wants to merge 1 commit into
Open
fix(v2): stop gamepad B/cancel from backing out of controller test and games#3604gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
…d 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_01EdiAR2HMM5pCMVfn2Zhbrx
Member
Author
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
Claude-Session: https://claude.ai/code/session_01EdiAR2HMM5pCMVfn2Zhbrx
Description
Explain the changes or enhancements you are proposing with this pull request.
Checklist
Please check all that apply.
Screenshots (if applicable)