Skip to content

DM_PAD_LABELS=1 maps a controller's face buttons by their printed letters - #1481

Closed
akshay4 wants to merge 1 commit into
seedds:mainfrom
akshay4:pad-labels
Closed

akshay4 wants to merge 1 commit into
seedds:mainfrom
akshay4:pad-labels

Conversation

@akshay4

@akshay4 akshay4 commented Nov 6, 2026

Copy link
Copy Markdown

What and why

Pads other than Nintendo's map by position, so an Xbox pad's Y sends the game's X and its A sends B. On-screen prompts then don't match the letters on the pad.

DM_PAD_LABELS=1 maps every pad by its printed letters. It's off by default and nothing changes without it. A Nintendo pad already maps this way.

Related: #634 is a launcher row for A/B, and #386 / #955 add a general DM_PAD_MAP, which could do the same with A=B,B=A,X=Y,Y=X once in. This one covers all four buttons with one switch.

Checked

  • Tests: t_pad_apple with fake Xbox, DualSense, HID, Pro Controller and Joy-Con pads, on and off; test_env_switches.py
  • Games run: Ocarina of Time 0400486024DEC000 v131072, about 50 minutes with an Xbox Wireless Controller. Each button was not checked by hand.
  • Devices and OS: M6, macOS 27.2. Not tried on iOS.
  • regress.py not run: the only code changed is face button mapping, behind a switch that's off by default.

Docs

  • Row in docs/env_switches.tsv
  • No game files, keys or data extracted from a game

@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) docs Documentation labels Nov 6, 2026
@akshay4

akshay4 commented Nov 7, 2026

Copy link
Copy Markdown
Author

Rebased on main. clang-tidy fails on main too, in files this doesn't touch.

…ters

Pads other than Nintendo's map by position, so an Xbox pad's Y sends the game's X and its A sends B. With the setting every pad maps name for name. It is off by default, and a Nintendo pad already maps this way.

Checked: t_pad_apple covers the setting on and off with fake Xbox, DualSense, HID, Pro Controller and Joy-Con pads. An Xbox Wireless Controller stayed connected through about 50 minutes of Ocarina of Time on an M6 Mac with the setting on; each button was not checked by hand.
Ayymeric pushed a commit to Ayymeric/nxnative that referenced this pull request Nov 17, 2026
An Xbox or PlayStation pad maps by position by default, as Switch emulators do: the right button is A. DM_PAD_MAP=label (launcher: Face buttons, By label) maps GameController's buttonA, the bottom button an Xbox pad marks A, to the Switch's A, buttonB to B, X to X and Y to Y, as PC games read an Xbox pad, so the letters the game asks for are the pad's. Nintendo pads map name for name either way; raw HID pads keep DM_HID_MAP. On the Mac and iOS (pad_apple.h). The host also tells a build's stubs (frame step state +0xb0), for prompts that follow the layout.

Other pull requests propose the same mapping under other names (seedds#1481 DM_PAD_LABELS, seedds#2196 DM_PAD_LAYOUT); seedds#386 uses the name DM_PAD_MAP for a remap. The name here can follow whichever is taken.

Front-ends: new: DM_PAD_MAP (Face buttons: position, label), in launcher.json for every game

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seedds

seedds commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thanks for covering the pad variants and trying the mapping with an Xbox controller in Ocarina of Time. I’m closing this in favor of #3018, which proposes the same four-button behavior as a launcher setting. The fake-pad cases here, including HID and Joy-Con, are useful coverage. The playtest did not check each button by hand, and the setting is still under review.

@seedds seedds closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation host The Horizon host: SVCs, services, threads, memory (dm/host)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants