mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-22 07:15:44 +00:00
Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
This commit is contained in:
@@ -833,6 +833,15 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef HIDAPI_IGNORE_DEVICE
|
||||
/* See if there are any devices we should skip in enumeration */
|
||||
unsigned short dev_vid = get_vendor_id(dev);
|
||||
unsigned short dev_pid = get_product_id(dev);
|
||||
if (HIDAPI_IGNORE_DEVICE(dev_vid, dev_pid)) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct hid_device_info *tmp = create_device_info(dev);
|
||||
if (tmp == NULL) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user