Xb2XInput icon indicating copy to clipboard operation
Xb2XInput copied to clipboard

implement proper libusb async polling

Open Lana-chan opened this issue 1 year ago • 3 comments

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

Lana-chan avatar Feb 05 '24 22:02 Lana-chan

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?

CptDoucheWizard avatar Apr 27 '24 18:04 CptDoucheWizard

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.

Lana-chan avatar Apr 27 '24 18:04 Lana-chan