Android: motion from the controller's sensors #828
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
stale
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-streetpea/chiaki-ng!828
Loading…
Reference in a new issue
No description provided.
Delete branch "aoleg94/android-controller-motion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The app always sends the phone's motion. On Android 12+ a controller's own gyro and
accelerometer are available through
InputDevice.getSensorManager(); this uses them for theactive controller (the one that sent the latest input).
Settings → Motion replaces the motion switch:
An existing "motion off" setting migrates to Off; on migrates to Auto.
Implementation
ControllerMotiontakes the sensors of the active controller, or of its separate" Motion Sensors" input device as the kernel exposes it for DualSense and DS4
(
MotionDeviceMatcher), and re-registers when the active controller changes.tracker, the same one desktop uses, so axes and the console's motion reset behave like desktop.
Testing
MotionSourceTest(selection table, migration) andMotionDeviceMatcherTest.correctly, Auto falls back to phone motion with the pad off, Controller only sends none.
Notes
Developed with the assistance of Claude Code, and tested on real hardware as described above.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.