You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mac: add optional Xbox letter-based controller mapping - #102
The Mac frontend currently maps face buttons by Nintendo position, so the A button on an Xbox controller sends B to the game. Add an opt-in DM_PAD_LAYOUT=letters setting for players who prefer the printed Xbox labels: A sends A, B sends B, X sends X, and Y sends Y.
The setting is read once when controllers start. The existing positional mapping remains the default. This is a Mac-only option that applies to all connected controllers, assumes Xbox-style labels, and does not detect controller types. The developer documentation describes these limits.
Validation:
git diff --check passes.
The Mac frontend passes Clang syntax checking with ARC and the Super Mario Bros. Wonder profile include paths. Clang reports the existing unused activity variable warning.
The Xbox letter mapping was manually tested on macOS with a physical Xbox controller in Super Mario Bros. Wonder. The subsequent change to read the setting once at startup was checked with Clang.
Heads-up: #388 proposes treating controls as data that every UI writes (#388 (comment)): the key and button maps (#386's DM_KEYMAP / DM_PAD_MAP) in one per-game store, so a controls page in any launcher and an in-app panel never disagree. An Xbox letter-based layout could then be a preset of that map rather than a separate switch. Input welcome in #388.
Thanks for the heads-up! A shared per-game mapping store makes sense to me. I’d be happy for the Xbox letter-based layout in this PR to become a preset on top of DM_PAD_MAP, while keeping it easy for users to select.
I’ve tested the letter-based mapping with a physical Xbox controller on macOS in Super Mario Bros. Wonder. I’ll follow #388 and can adapt this PR once the mapping interface is settled.
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
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 Mac frontend currently maps face buttons by Nintendo position, so the A button on an Xbox controller sends B to the game. Add an opt-in
DM_PAD_LAYOUT=letterssetting for players who prefer the printed Xbox labels: A sends A, B sends B, X sends X, and Y sends Y.The setting is read once when controllers start. The existing positional mapping remains the default. This is a Mac-only option that applies to all connected controllers, assumes Xbox-style labels, and does not detect controller types. The developer documentation describes these limits.
Validation:
git diff --checkpasses.activityvariable warning.