Skip to content

Commit

Permalink
Merge pull request #4273 from Be-ing/apple_vid
Browse files Browse the repository at this point in the history
HidEnumerator: skip HID devices with Apple's other vendor ID
  • Loading branch information
Holzhaus authored Sep 8, 2021
2 parents 35d2a9a + 448d311 commit 42356b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/controllers/hid/hiddenylist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/hid/hidenumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 42356b1

Please sign in to comment.