Fix low-speed Android mouse precision - #738
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reported by Discord user <@898574017726922802> (𝓡3 | ASTA).
What changed
MotionEventbatches before sending one low-latency packet.Root cause
Pointer capture delivers raw
AXIS_RELATIVE_X/Yvalues as floats. The Android path rejected each axis below0.5f, rounded the surviving value to an integer before applying sensitivity, and read only the newest sample in a potentially coalesced event. Very slow movement and low sensitivity therefore lost most or all motion, while larger deltas survived and felt disproportionately faster.The physical mouse path does not consult the decoded GFN resolution or touch-coordinate conversion. A resolution mismatch could only produce a constant scale error, not the observed speed-dependent loss, so this change does not add speculative resolution scaling. Configured acceleration also only boosts larger deltas and defaults to
1; it remains opt-in and is now applied before quantization.Touch routing, native touch, direct click, controller input, and mouse buttons are unchanged.
Cursor size assessment
Android deliberately hides its local pointer during pointer capture. The cursor visible during gameplay is rendered by the remote GFN session inside the decoded video, so this Android client has no safe cursor-size rendering control to adjust here. No cursor-size change is included.
Validation
./gradlew testDebugUnitTest --tests '*MouseMotionAccumulatorTest' --tests '*ExternalMousePointerCaptureTest' assembleDebug --no-daemon— passes on the latestandroid-nativebase.StreamPointForTouchTest.stretchAndZoomMapTheVisibleFilledSurfaceexpectation (405expected,360actual); it reproduces alone and neither that test nor its mapping path changed in this PR.The supplied Discord MP4 currently returns HTTP 404 from both
cdn.discordapp.comandmedia.discordapp.net, so its frames could not be inspected. The authenticated stream/cursor surface also requires a real NVIDIA/GFN account, which was not available in the emulator. Because this is an input-event pipeline fix with no static visual delta, the screenshots below are honest runtime smoke proof from the final fixed APK rather than a fabricated cursor comparison.Visual proof
Final fixed APK first-run screen:
Final fixed APK sign-in screen: