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

implement proper libusb async polling #53

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Lana-chan
Copy link

rewrites some of the polling code that uses sleep (uggo!) with libusb_handle_events_timeout and the appropriate async transfer calls. i've checked this to work with both interrupt and control transfers on my Controller S and it fixes inputs being stuck due to dropped packets (#52), compiled with vs2022 x64 on win10

i've also pulled from #40 to use updated libraries

@CptDoucheWizard
Copy link

Hi! I just downloaded this solution to have a go with and one of my controllers periodically gets an exception on line 567 of the XboxController.cpp "Exception thrown at 0x00007FFD6B3D6A0A (libusb-1.0.dll) in Xb2XInput.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF." It works for a short while, then the exception occurs.
All other controllers are fine. This is a controller that I added to the install drivers batch file and the XboxController.cpp file

Any ideas?

@Lana-chan
Copy link
Author

sorry, if the problem happens with only one of your controllers and not the others, and i have no idea what controller it is let alone have it in my paws, i have no idea how to troubleshoot it for you. my suggestion is using wireshark to take usb captures of the problematic controller and see how it differs from the others and what concessions you need to make for it in libusb.

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.

3 participants