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

Some controllers vibrate too hard and long #140

Open
duhrer opened this issue Dec 26, 2023 · 0 comments
Open

Some controllers vibrate too hard and long #140

duhrer opened this issue Dec 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@duhrer
Copy link
Contributor

duhrer commented Dec 26, 2023

In recent testing work, I noticed that vibration-triggering events (like scrolling too far up) were continuing for far too long (like 30 seconds), when they should last for half a second. They also seemed more intense than intended.

After some testing with an online gamepad tester, I realised that the controller was showing up twice, once connected via bluetooth, and once connected via USB. Since we send vibration events to all connected game controllers that support it, a single controller was being asked to vibrate twice, and the odd behaviour was the result.

I looked into things, it seems like it's possible to end up with duplicate controllers if you first connect via bluetooth and then connect a USB cable. Unfortunately, their IDs are different, and there are not great options for comparing them. For something like the DualShock, the slight offset of each of the thumb sticks in the resting state is a kind of signature, but even a short time difference in checking the values would be thrown off if any stick is in use.

As the circumstances to reproduce are very specific, I am more documenting this for future reference than planning to fix it at this point. I may revisit when and if we decide to improve the support for multiple game pads.

For now, the workaround is simply to only connect via one means or another, i.e. either use USB or use bluetooth.

@duhrer duhrer added the bug Something isn't working label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant