Skip to content

Mac: map a Nintendo controller's face buttons by label - #295

Closed
JustWoody wants to merge 1 commit into
seedds:mainfrom
JustWoody:mac-nintendo-face-buttons
Closed

JustWoody wants to merge 1 commit into
seedds:mainfrom
JustWoody:mac-nintendo-face-buttons

Conversation

@JustWoody

Copy link
Copy Markdown
Contributor

macOS reports a Switch Pro Controller's face buttons by their labels (its
buttonA is the button marked A, on the right), so the positional map, which
assumes GameController's Xbox-style positions, swapped A/B and X/Y on it
(macOS 27). Nintendo controllers (Pro Controller, Joy-Con: their product
category or vendor name) now map by label and every other controller by
position as before. DM_PAD_ABXY=label or position forces one map. The connect
log line names the controller's product category and the map it got.

Tested on a Mac with a Pro Controller over Bluetooth in Celeste: A confirms,
B goes back. The iPhone's DmGamepad.m keeps the positional map; it may need the
same, untested there.

🤖 Generated with Claude Code

macOS reports a Switch Pro Controller's face buttons by their labels (its
buttonA is the button marked A, on the right), so the positional map, which
assumes GameController's Xbox-style positions, swapped A/B and X/Y on it
(macOS 27). Nintendo controllers (Pro Controller, Joy-Con: their product
category or vendor name) now map by label and every other controller by
position as before. DM_PAD_ABXY=label or position forces one map. The connect
log line names the controller's product category and the map it got.

Tested on a Mac with a Pro Controller over Bluetooth in Celeste: A confirms,
B goes back. The iPhone's DmGamepad.m keeps the positional map; it may need the
same, untested there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@v0lumehi

Copy link
Copy Markdown
Contributor

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. Mapping face buttons by label is also proposed in #180 and #382. It would help to settle it in one place.

@seedds

seedds commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Superseded by 90eca2f (PR #650), which shares automatic Nintendo face-button mapping between Mac and iOS. The unimplemented DM_PAD_ABXY manual override has been carried forward into the controls work: #386 (comment). Closing this overlapping implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants