diff options
| author | LC <mathew1800@gmail.com> | 2020-07-11 11:56:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-11 11:56:30 -0400 |
| commit | ed32a2a1fe1d63f3ac1d9380b2328ebff39668e8 (patch) | |
| tree | 74419e9421f157a49432aa73cc91f2b3e247883f /Source/Core/InputCommon/GCAdapter.cpp | |
| parent | 41a570c74e6615097354947471e789751b4088d9 (diff) | |
| parent | b350d3cca3c9cdf922d141d75ce259b63564e24e (diff) | |
Merge pull request #8946 from jordan-woyak/unbreak-mayflash
InputCommon/GCAdapter: Unbreak Mayflash GCAdapters by allowing libusb_control_transfer call to fail.
Diffstat (limited to 'Source/Core/InputCommon/GCAdapter.cpp')
| -rw-r--r-- | Source/Core/InputCommon/GCAdapter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 3b8e823b24..ab9618efdf 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -303,9 +303,11 @@ static bool CheckDeviceAccess(libusb_device* device) ERROR_LOG(SERIALINTERFACE, "libusb_detach_kernel_driver failed with error: %d", ret); } - ret = libusb_control_transfer(s_handle, 0x21, 11, 0x0001, 0, nullptr, 0, 10000); - if (ret < 0) - ERROR_LOG(SERIALINTERFACE, "libusb_control_transfer failed with error: %d", ret); + // This call makes Nyko-brand (and perhaps other) adapters work. + // However it returns LIBUSB_ERROR_PIPE with Mayflash adapters. + const int transfer = libusb_control_transfer(s_handle, 0x21, 11, 0x0001, 0, nullptr, 0, 1000); + if (transfer < 0) + WARN_LOG(SERIALINTERFACE, "libusb_control_transfer failed with error: %d", transfer); // this split is needed so that we don't avoid claiming the interface when // detaching the kernel driver is successful |
