Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit max polling rate #142

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Limit max polling rate #142

merged 2 commits into from
Jun 3, 2024

Conversation

XuYicong
Copy link
Member

@XuYicong XuYicong commented May 24, 2024

Fixes some Wuthering Waves pointer issue

Previously, playcover would deliver a touch event to the game whenever a mouse event arrives. However, some mouses have poll rate over 1000 which is far beyond the designed processing ability of a touchscreen game.

In this PR, a swipe action's polling rate is limited to no more than 125, so as to fix some issues caused by high polling rate.

This might also fix PlayCover/PlayCover/issues/1483, in such a case: that the touching system is overwhelmed by too many move events, and the system decides to randomly drop some events, and eventually drops a touch_end event. If people are reporting it only on mouse but not touchpad, that could be this case.

Personally I'm playing with a touchpad and everything works perfectly. I don't have a working mouse so I can't say for sure if it's actually fixed. Someone if you have that issue please help me test thx.

@Depal1
Copy link
Member

Depal1 commented Jun 2, 2024

PlayCover/PlayCover#1022 per se is not fixed by the rate limiter, as it can still be replicated by spamming the scrolling wheel.

@XuYicong
Copy link
Member Author

XuYicong commented Jun 2, 2024

PlayCover/PlayCover#1022 per se is not fixed by the rate limiter, as it can still be replicated by spamming the scrolling wheel.

It's because the rate limit is put on mouse moved event, not including scroll wheel event. Maybe I should change it to limiting them both.

@XuYicong
Copy link
Member Author

XuYicong commented Jun 3, 2024

PlayCover/PlayCover#1022 per se is not fixed by the rate limiter, as it can still be replicated by spamming the scrolling wheel.

I just found that PlayCover/PlayCover#1022 is not a matter of polling rate. So I will open another PR to fix it. This PR is OK to merge.

@XuYicong XuYicong merged commit 7c16782 into PlayCover:master Jun 3, 2024
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.

[Game Support]: Wuthering Waves: mouse randomly fails to pan then zooms in and out instead.
3 participants