Browse Source

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.
Sam Lantinga 1 year ago
parent
commit
9301f7ace2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/hidapi/libusb/hid.c

+ 1 - 0
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 */