Repository navigation
Description
What happened
I started the game without a controller and walked to Kokiri Village with the keyboard. Music/BGM plays fine. As soon as I connect a Switch Pro Controller over USB (or Bluetooth / different USB ports tested too), the music stops completely while SFX keep playing. This happens every time I run the game. If I never connect the controller and just play with KB, the BGM works.
The attached log (0400486024DEC000_controller_audio.log) shows what happens at connect:
1. 'Pro Controller' connected: player 1 (npad 0) [GameController path]
2. 'Pro Controller' disconnected: player 1 (npad 0) is free
3. 'Pro Controller' (HID) connected: player 1 (npad 0)
4. 'Pro Controller' (HID) connected: player 2 (npad 1)
Both come from the same device (057e:2009, USB location 0x100000) and the same
report 0x30 stream. Log line: "GameController lists 1 of 2 pads of this model".
5. From then on, every frame:
oe library applet: controller support
oe focus state -> 2 (library applet open)
hid controller applet: 1 to 1 players wanted, 2 connected
oe focus state -> 1 (library applet closed)
(339 times in the attached log, about one per frame, until I quit)
The audio renderer itself looks healthy during this. Render time is a mean of 0.09 ms with a max of 0.26 ms. Every report shows 0 underruns and 0 zero-padded frames, including the one covering the connect.
The game calls oe::SetFocusHandlingMode 2 (focus notifications). My guess, which the log doesn’t prove, is that the focus flipping every frame makes the game pause or mute its BGM stream.
An earlier log from a session where the controller was already connected at boot shows the same pattern.
Workaround
- Mac: a keyboard receiver (Keychron Link) becomes player 1 as a raw HID pad since PR #859Â #1657 sees the same issue, and using
DM_HID_PADS=0inenv.txtworks as a workaround.
Suggested fixes by Claude
- Deduplicate pads in the HID path (the root fix).
The log shows the pad registered once through GameController (player 1, with motion and haptics). It’s then dropped (“is free”) and re-registered twice by the HID path (player 1 and player 2).
Both HID entries have the same USB location, 0x100000.
Key HID devices by their IOKit location ID, or serial number if present, and create one npad per key. Ignore a second matching callback for a key that’s already registered.
The line GameController lists 1 of 2 pads of this model suggests the code matches pads by model counts. Matching by location ID would be more reliable, and would also keep two real Pro Controllers apart.
Also check why the GameController registration gets torn down before the HID takeover. If the two paths hand off, the handoff should leave one pad, not two.
- Make the controller applet stub resolve the mismatch.
When the game asks for 1 player and 2 are connected, the stub should keep one pad (the lowest npad or the most recently active) and hide the rest from the game. Then it should return success.
It currently returns with “2 connected” still true, so the game calls the applet again every frame. That’s a bug even with a legitimate second controller.
What you expected
One Pro Controller should register as one player. The music should keep playing with the controller.
Game, title ID and version
0400486024DEC000
nxnative commit
Shader chain version
3ee52af3ca18
How it was built and run
Mac app (--platform mac-app)
Device and OS
MacBook Pro M5 Pro 24 GB
Settings and environment overrides
none
Logs
nxnative-report-0400486024DEC000-2026-11-07.zip
No game files
- Nothing attached here contains game files, keys or data extracted from a game.
Activity
eerive commentedon Nov 7, 2026
#1685 could be tested to see if it fixes this issue. I think this bug is could be applying to every hardware.
[-]Ocarina of Time: BGM stops when Pro Controller connects[/-][+]Ocarina of Time [0400486024DEC000]: BGM stops when Pro Controller connects[/+]ZhaowTao commentedon Nov 8, 2026
Fixed for me by #1722 (
a00f03bb) — BGM keeps playing with the Pro Controller connected, and no workaround neededAdding the post-fix confirmation this issue has been missing. My earlier sessions hit the same symptom, and the
DM_PAD_IDENTICAL=0workaround from #1719 / #1725 got the music back at the cost of the pad's extra features. That is no longer necessary.Build: main
1794a35a(2026-11-08 17:01), which includesa00f03bb("one Pro Controller is one pad"),--platform mac-app, shader chain579d06bf3932.~/Library/Application Support/nxnative/0400486024DEC000/env.txtis empty — noDM_PAD_IDENTICAL, no per-game overrides of any kind. That is the point: this is the unmodified path.Pad: Switch Pro Controller, Bluetooth.
Log, at connect:
One enumeration, one player. Across the whole session (45,300 frames, ~24 minutes, Kokiri Forest → Lost Woods → Sacred Forest Meadow):
controller appletopensplayer 2 (npad 1)Music. BGM plays in Kokiri Forest, the Lost Woods and Sacred Forest Meadow, and in the pause menu.
audio #0 device callbacksreached 368,000 with 4.0 blocks queued at callback; 183 of 184 reports show 0 underruns, the one exception being 17 underruns / 78.8 ms zero-padded at 196,000. So the audio thread was never suspended for the length of the session — the applet loop that used to suspend it is gone.Gyro works as well, slingshot and bow aiming included, with no separate setting.
One honest caveat on the pad: haptics are attached to both handles and both motors, but the host says
so I get plain rumble rather than the HD (amplitude/frequency) form on that handle. That reads like a separate macOS HID matter, not the duplicate-pad problem this issue is about, and it does not affect the music. Worth its own report if someone can compare against a build where the advanced players do attach.
So: with
a00f03bbin the build, one pad enumerates once, the applet never opens, and the BGM does not stop. TheDM_PAD_IDENTICAL=0workaround can be dropped.eerive commentedon Nov 9, 2026
Using commit
79741184resolved this issue. Closing this bug as resolved.