From 448d31150f46ed5836096a614a7f721b4a19a26c Mon Sep 17 00:00:00 2001 From: Be Date: Wed, 8 Sep 2021 09:32:21 -0500 Subject: [PATCH] HidEnumerator: skip HID devices with Apple's other vendor ID --- src/controllers/hid/hiddenylist.h | 2 ++ src/controllers/hid/hidenumerator.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/hid/hiddenylist.h b/src/controllers/hid/hiddenylist.h index 10c7f4eba30..af495ebe410 100644 --- a/src/controllers/hid/hiddenylist.h +++ b/src/controllers/hid/hiddenylist.h @@ -14,7 +14,9 @@ hid_denylist_t hid_denylisted[] = { {0x1157, 0x300, 0x0, 0x0, 0x3}, // EKS Otus mouse pad (linux) }; +// Apple has two two different vendor IDs which are used for different devices. constexpr unsigned short kAppleVendorId = 0x5ac; +constexpr unsigned short kAppleIncVendorId = 0x004c; constexpr unsigned short kGenericDesktopUsagePage = 0x01; diff --git a/src/controllers/hid/hidenumerator.cpp b/src/controllers/hid/hidenumerator.cpp index ec7aec6b758..57487e87f5d 100644 --- a/src/controllers/hid/hidenumerator.cpp +++ b/src/controllers/hid/hidenumerator.cpp @@ -23,7 +23,7 @@ bool recognizeDevice(const hid_device_info& device_info) { // these devices in future computers and none of these devices are DJ controllers, // so skip all Apple HID devices rather than maintaining a list of specific devices // to skip. - if (device_info.vendor_id == kAppleVendorId) { + if (device_info.vendor_id == kAppleVendorId || device_info.vendor_id == kAppleIncVendorId) { return false; }