mirror of https://github.com/encounter/SDL.git
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.
This commit is contained in:
parent
46e1377d49
commit
868551b121
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue