Filter libusb devices early in enumeration

Some device drivers crash if you query things like manufacturer and product name, so make sure we only touch devices that we're really interested in.
This commit is contained in:
Sam Lantinga
2025-12-30 10:35:32 -08:00
parent 95ac0ff4d6
commit d33642b710
8 changed files with 16 additions and 42 deletions

View File

@@ -596,7 +596,7 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
#ifdef HIDAPI_IGNORE_DEVICE
/* See if there are any devices we should skip in enumeration */
if (HIDAPI_IGNORE_DEVICE(get_bus_type(dev), dev_vid, dev_pid, usage_page, usage)) {
if (HIDAPI_IGNORE_DEVICE(get_bus_type(dev), dev_vid, dev_pid, usage_page, usage, false)) {
free(cur_dev);
return NULL;
}