Skip to content

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
seedds:mainfrom
Haseenesss:phone-gyro-fallback
Open

Haseenesss wants to merge 1 commit into
seedds:mainfrom
Haseenesss:phone-gyro-fallback

Conversation

@Haseenesss

Copy link
Copy Markdown
Contributor

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.h took 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=1 log shows the X5 Lite sends the same report every time: 26 controller lines, all acc +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

  • Tests: make -C dm/host/tests GAME=01007EF00011E000 build/t_motion_apple and its run pass on this branch. python3 -m unittest dm.tools.tests.test_docs passes (11 tests). Without the change, the new constant-rotation cases fail.
  • Games run, with title ID and version: none on this Mac. The reporter's iOS log for Breath of the Wild (01007EF00011E000) with the X5 Lite gives the values above. With DM_PHONE_MOTION=1 the 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.
  • Devices and OS: Apple M-series Mac, macOS 27.2 (tests only). Reporter: iPhone with a GameSir X5 Lite over USB.
  • 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

  • The finding is in its game note or its docs/reference/<subsystem>.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index)
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change (no chain change)
  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) docs Documentation labels Nov 8, 2026
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>
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.

1 participant