Fixed duplicate controller entries on Mac OS X when using libusb, due to the HID interface number not being available in the Mac OS X HID code.

Sam Lantinga 2019-12-20 21:00:16 -08:00
parent 46e1377d49
commit 868551b121
1 changed files with 1 additions and 1 deletions

View File

@ -559,7 +559,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
for (raw_dev = raw_devs; raw_dev; raw_dev = raw_dev->next) { for (raw_dev = raw_devs; raw_dev; raw_dev = raw_dev->next) {
if (usb_dev->vendor_id == raw_dev->vendor_id && if (usb_dev->vendor_id == raw_dev->vendor_id &&
usb_dev->product_id == raw_dev->product_id && usb_dev->product_id == raw_dev->product_id &&
usb_dev->interface_number == raw_dev->interface_number) { (raw_dev->interface_number < 0 || usb_dev->interface_number == raw_dev->interface_number)) {
bFound = SDL_TRUE; bFound = SDL_TRUE;
break; break;
} }