Repository navigation
Motion: a controller is a source once its rotation rate changes, so one with no gyroscope leaves the phone's - #1877
Open
Haseenesss wants to merge 1 commit into
Open
Haseenesss wants to merge 1 commit into
Haseenesss wants to merge 1 commit into
Conversation
…ne with no gyroscope leaves the phone's The GameSir X5 Lite, a controller an iPhone mounts in, has no gyroscope, but GameController lists it with a rotation rate. A few seconds after it connected, the phone's gyro stopped driving player 1's six-axis sensor (LNPANDY/NX2Apple#971): the Apple adapter took any report that is not all zeroes as live motion, and a fresh controller source wins over the phone's. The reporter's DM_MOTION_LOG=1 log shows the X5 Lite sending the same report every time: acc 0 0 -1.04 G, gyro 0 0.003 0 rev/s. The adapter now takes a controller as a source once its rotation rate changes from its first report. A real gyroscope's noise changes it within a few reports; a missing one never does, and the zero-only reports of seedds#296 are the same case. 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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
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.
What and why
On an iPhone with a GameSir X5 Lite attached, the phone's gyro stopped driving the game a few seconds after the controller connected (LNPANDY/NX2Apple#971, Breath of the Wild 01007EF00011E000). The X5 Lite has no gyroscope, but GameController lists it with a rotation rate, so the host logs
controller 'GameSir-X5 Lite_S' connected: player 1 (npad 0), with motion (gyro).motion_apple.htook any report that is not all zeroes as live motion. A fresh controller source wins over the phone's (DM_PHONE_MOTION=auto), so the phone's motion was no longer used.The reporter's
DM_MOTION_LOG=1log shows the X5 Lite sends the same report every time: 26 controller lines, allacc +0.00 +0.00 -1.04 G, gyro +0.000 +0.003 -0.000 rev/s, mixed with the phone's lines while it is held and moved.dm/host/motion_apple.h: a controller becomes a source only after its rotation rate changes from its first report. A real gyroscope's noise changes it within a few reports. A missing one never does. The zero-only reports of Mac: controller motion (Switch Pro Controller gyro over HID) #296 are the same case, so the all-zero check is now part of this rule.dm/host/tests/t_motion_apple.m: a constant non-zero rotation gives no sample until it changes. This holds again after the controller is detached and attached again.docs/reference/services.md: the entry "A gyroscope advertised but not there (iOS)".LNPANDY/NX2Apple carries this change as a patch until it lands here (LNPANDY/NX2Apple#975).
Checked
make -C dm/host/tests GAME=01007EF00011E000 build/t_motion_appleand its run pass on this branch.python3 -m unittest dm.tools.tests.test_docspasses (11 tests). Without the change, the new constant-rotation cases fail.DM_PHONE_MOTION=1the phone's gyro works with the X5 Lite attached, which matches the cause. The iOS build with this change has not been run on a device yet.regress.py: none. The change only decides whether a GameController controller's motion counts as a source; no game code, shaders or rewriter are involved.Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)dmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change (no chain change)🤖 Generated with Claude Code