From baa0dab6114e8654161478e10a20c67cf5d1a1a3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 24 Sep 2023 14:54:40 -0700 Subject: [PATCH] Only enumerate each interface once (#625) 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. --- libusb/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libusb/hid.c b/libusb/hid.c index d6346d2af..0981d3416 100644 --- a/libusb/hid.c +++ b/libusb/hid.c @@ -885,6 +885,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, libusb_close(handle); handle = NULL; } + break; } } /* altsettings */ } /* interfaces */