From 9301f7ace22a67364130b5948c110046a91c3fbe Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 15 Sep 2023 05:07:05 -0700 Subject: [PATCH] hidapi/libusb: only enumerate each interface once If a device has multiple altsettings, like an Xbox Series X controller, make sure we only enumerate each interface once, not once for each altsetting. --- src/hidapi/libusb/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c index 9bec8e2e8..880f8d61b 100644 --- a/src/hidapi/libusb/hid.c +++ b/src/hidapi/libusb/hid.c @@ -1023,6 +1023,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, libusb_close(handle); handle = NULL; } + break; } } /* altsettings */ } /* interfaces */