From 868551b1218511892b5f619aefbec728081c8a43 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 20 Dec 2019 21:00:16 -0800 Subject: [PATCH] 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. --- src/hidapi/SDL_hidapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c index a06c2cfd3..c35c44ff0 100644 --- a/src/hidapi/SDL_hidapi.c +++ b/src/hidapi/SDL_hidapi.c @@ -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) { if (usb_dev->vendor_id == raw_dev->vendor_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; break; }