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.
This commit is contained in:
Léo Lam 2017-03-26 12:08:53 +02:00
parent 0b6170cc33
commit 3cfd9ea9b2
1 changed files with 1 additions and 1 deletions

View File

@ -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",