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

main
Patrick Hogan 2021-05-27 14:42:03 -05:00 committed by Sam Lantinga
parent 2af3f64ecf
commit 28da6c5ddb
1 changed files with 7 additions and 0 deletions

View File

@ -488,6 +488,13 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
continue; 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_vid = get_vendor_id(dev);
dev_pid = get_product_id(dev); dev_pid = get_product_id(dev);