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

Adapter hot-swapping support #257

Conversation

JulienBernard3383279
Copy link
Contributor

Fixes GC adapter hot-swapping. No more "my polling rate is >10k".

Demo video

Currently requires 100 error responses to poll requests in a row to consider the adapter has been permanently disconnected.
The disconnection of the adapter if comms died is done by a non-polling thread. The polling thread writes down that the adapter is MIA, and this is acted upon when: a pad status read happens / a polling rate update happens in the relevant WX window / when that window is opened.

I don't know if pad status = full zero i.e sticks left/down is a great answer to an adapter disconnecting mid-match. Perhaps centered pad state with a message would be better...

Also I don't know if this should go to release/2.3.0 or master but for diff sake I set it to release/2.3.0, can be rebased later.

@NikhilNarayana
Copy link
Member

So this definitely works on Windows and doesn't work on Linux (at least not on my Arch box). I didn't get the time to test macOS. I wish it worked on all of them, but there is probably some libusb implementation detail that is causing the issue. I will probably merge this after I confirm if it works on mac or not since the gain is worth it overall.

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.

2 participants