Repository navigation
Mac: one Pro Controller is one pad again, so it keeps its gyro (#971) - #972
Merged
Merged
Conversation
…DY#971) IOHIDManager reports a device once for each matching dictionary it meets, each time under a new IOHIDDeviceRef. pad_hid_mac.h matches the Pro Controller's vendor and product besides the gamepad usages, and told devices apart by reference only, so one Pro Controller counted as two of its model against GameController's one. Both were read as twins, players 1 and 2, and GameController's controller, with its motion, was left unread. Breath of the Wild opened the controller applet every few frames and saw no gyro. Patch 0097 backports seedds/nxnative a00f03b, which knows a pad by its registry entry. Patch 0098 adds the regression test in t_controllers_mac.m. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
main moved the pin to c78d7375, which contains seedds/nxnative a00f03b. The backport patch is dropped; the regression test in t_controllers_mac.m stays as patch 0099, after main's 0097 and 0098. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Haseenesss
added a commit
to Haseenesss/NX2Apple
that referenced
this pull request
Nov 8, 2026
…d 0101 main moved the pin to c78d7375 and added patches 0097 and 0098; LNPANDY#972 takes 0099. Both patches here apply unchanged on the new pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Renumber patch to 0100, next free on main
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.
Fix or feature
What and why
Fixes the Mac part of #971: one Pro Controller was read as two players, and its gyro did not reach the game.
Symptom. The log in #971 (Breath of the Wild, v1.3.0, one Pro Controller over USB) shows the same pad taken twice at the same USB location, then the controller applet over and over (360 times in 30 s):
Cause. The identical-pads reader (
pad_hid_mac.h, new in the v1.3.0 pin) matches the Pro Controller's vendor and product besides the gamepad usages. IOHIDManager reports a device once per matching dictionary it meets, each time under a newIOHIDDeviceRef, andhidpad_foundcompared references only. So one pad counted as two of its model against GameController's one, both references were read as twins (players 1 and 2), and GameController's controller, the one with motion, was left unread. v1.2.3 did not have this reader.Change. Upstream fixed the same bug on 2026-11-08 in seedds/nxnative a00f03b (from seedds/nxnative#1722, found on Ocarina of Time). This PR first carried it as a backport. Since main moved the pin to c78d7375, which contains a00f03b, the backport is gone and the fix itself comes with the pin. What remains:
patches/0099-test-one-pro-controller-is-one-pad.patch: the regression test, int_controllers_mac.m(which comes with patch 0081, Add Steam Controller (2026) support on macOS seedds/nxnative#221, sofork-onlyuntil then).The iOS part of #971 is a separate cause (a controller with no gyroscope that iOS lists with one, which kept the phone's gyro out) and is in #975.
Checked
python3 tools/engine.py check(65 patches apply cleanly to c78d7375).t_controllers_mac,t_motion_pro_mac,t_pad_hid,t_hid,t_pad_propass on an engine rebuilt from the series.test_hid_same_device_twiceint_controllers_mac.mreports a generic pad and a Pro Controller twice each, under two references to one registry entry: one pad and one player for the first, no twins for the second (GameController keeps reading it). It fails without a00f03b and passes with it.IOHIDDeviceRefs for the same registry entry, on a plain and on an independent manager.Screenshots
None, no visible change.
Scope
dm/,scripts/,docs/,ref/) is added to the repository: a change there is a patch inpatches/(a commit inengine/, thentools/engine.py export, andtools/engine.py checkpasses), with itsUpstream-Statusforwarded seedds/nxnative#..., orpendinguntil that PR is open (upstream already has the fix, a00f03b, in the pin; the test isfork-onlywith patch 0081)🤖 Generated with Claude Code