Have HIDAPI skip MFI supported HID devices on macOS to avoid duplicate devices.

This commit is contained in:
Patrick Hogan authored and Sam Lantinga committed 2021-06-03 09:03:11 -07:00
1 parent 2af3f64ecf
commit 28da6c5ddb
1 file changed
+7
+7
View File
@@ -488,6 +488,13 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
continue;
}
#if defined(SDL_JOYSTICK_MFI) && defined(__MACOSX__)
extern SDL_bool IOS_SupportedHIDDevice(IOHIDDeviceRef device);
if (IOS_SupportedHIDDevice(dev)) {
continue;
}
#endif
dev_vid = get_vendor_id(dev);
dev_pid = get_product_id(dev);