Skip to content

fix: Handle high polling rate sources#261

Merged
alexytomi merged 1 commit into
v3_openjdkfrom
feat/misc
May 14, 2026
Merged

fix: Handle high polling rate sources#261
alexytomi merged 1 commit into
v3_openjdkfrom
feat/misc

Conversation

@alexytomi
Copy link
Copy Markdown
Member

Android's onTouch and onGenericMotion are only called every screen refresh. This means it is tied to your hz. So what android does for high refresh rate devices is it stores them in
MotionEvent.getHistoricalAxisValue() and makes you process them all at once on the next screen refresh.

See
https://developer.android.com/reference/android/view/MotionEvent#batching

We used to just completely ignore this so high DPI mice didn't work properly.

Hopefully high DPI everything now works properly.

Android's onTouch and onGenericMotion are only called every screen
refresh. This means it is tied to your hz. So what android does for high
refresh rate devices is it stores them in
MotionEvent.getHistoricalAxisValue() and makes you process them all at
once on the next screen refresh.

See
https://developer.android.com/reference/android/view/MotionEvent#batching

We used to just completely ignore this so high DPI mice didn't work
properly.

Hopefully high DPI everything now works properly.
@alexytomi alexytomi force-pushed the feat/misc branch 2 times, most recently from d080c6a to 9070983 Compare May 14, 2026 15:20
@alexytomi alexytomi merged commit ffe4929 into v3_openjdk May 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant