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

InputCommon/GCAdapter: Fix offbrand "GCAdapters". #8933

Open
wants to merge 1 commit into
base: master
from

Conversation

@jordan-woyak
Copy link
Member

jordan-woyak commented Jul 5, 2020

This makes my Nyko-branded GCAdapter work and probably others. Please test.

Note that libusb_control_transfer calls give a LIBUSB_ERROR_BUSY error within a hotplug callback so I've introduced an Event to initialize adapters in the "scanning" thread.

I'm not entirely happy with this fix but GCAdapter needs a complete rewrite. The error handling is bad. The inter-thread communication is bad. And 90% of the logic is copy-pasted to GCAdapter_Android.cpp.

This PR does not attempt to fix the Android-side of things. I can't test there.

@JMC47
Copy link
Contributor

JMC47 commented Jul 6, 2020

I can test GC adapter code on Android, but I don't have Nyko.

@JMC47
Copy link
Contributor

JMC47 commented Jul 6, 2020

This adapter here still doesn't work.

https://cdn.discordapp.com/attachments/521710974827495435/729598461900488754/unknown.png

It spams the logs with this:

17:55:603 InputCommon\GCAdapter.cpp:91 E[SI]: adapter libusb read failed: err=LIBUSB_ERROR_IO

@NikhilNarayana
Copy link

NikhilNarayana commented Jul 7, 2020

I have had two people test master and this PR with a pdobq adapter and this fix has worked for them.

Image of the adapter for reference: https://cdn.discordapp.com/attachments/363806218181017601/729876869658181702/image0.jpg

EDIT: Just had someone test with different adapter brand and it worked
https://www.amazon.com/dp/B07Q459FBQ/ref=cm_sw_r_cp_api_i_DA-aFbY54SRKB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.