Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
This commit is contained in:
1 parent
e6834a1535
commit
007c36e513
9 files changed
+84
-21
No files matched your search
@@ -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