From 3cfd9ea9b2824ae50342c34453a35e356a2f463d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 26 Mar 2017 12:08:53 +0200 Subject: [PATCH] IOS/BTReal: Always use config descriptor 0 This may fix LIBUSB_ERROR_NOT_FOUND whenever devices end up being in an unconfigured state. We don't need anything more than the first config descriptor anyway. --- Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp index e76becfc96..6326bd447f 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp @@ -94,7 +94,7 @@ ReturnCode BluetoothReal::Open(const OpenRequest& request) libusb_device_descriptor device_descriptor; libusb_config_descriptor* config_descriptor; libusb_get_device_descriptor(device, &device_descriptor); - const int ret = libusb_get_active_config_descriptor(device, &config_descriptor); + const int ret = libusb_get_config_descriptor(device, 0, &config_descriptor); if (ret != 0) { ERROR_LOG(IOS_WIIMOTE, "Failed to get config descriptor for device %04x:%04x: %s",