Commit 3985b7c5 authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

winebus.sys: Do not attempt to open keyboard and mouse HID devices on macOS.

Doing so triggers a permissions prompt for input monitoring. Patch originally by Rémi Bernon.
parent 5da459f1
......@@ -276,6 +276,16 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
};
struct iohid_device *impl;
CFStringRef str;
UINT usage_page, usage;
usage_page = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDPrimaryUsagePageKey)));
usage = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDPrimaryUsageKey)));
if (usage_page == HID_USAGE_PAGE_GENERIC && (usage == HID_USAGE_GENERIC_MOUSE || usage == HID_USAGE_GENERIC_KEYBOARD))
{
TRACE("Ignoring mouse / keyboard device\n");
return;
}
desc.vid = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDVendorIDKey)));
desc.pid = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDProductIDKey)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment