mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-27 00:51:34 +00:00
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:
@@ -1042,7 +1042,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
||||
HidP_GetCaps(pp_data, &caps);
|
||||
HidD_FreePreparsedData(pp_data);
|
||||
}
|
||||
if (HIDAPI_IGNORE_DEVICE(bus_type, attrib.VendorID, attrib.ProductID, caps.UsagePage, caps.Usage)) {
|
||||
if (HIDAPI_IGNORE_DEVICE(bus_type, attrib.VendorID, attrib.ProductID, caps.UsagePage, caps.Usage, false)) {
|
||||
goto cont_close;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user