diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index 40f4b1f3c2f..45cca15c82a 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -285,6 +285,10 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void * desc.version = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDVersionNumberKey))); desc.uid = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDLocationIDKey))); + if ((str = IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDTransportKey)))) + desc.is_bluetooth = !CFStringCompare(str, CFSTR(kIOHIDTransportBluetoothValue), 0) || + !CFStringCompare(str, CFSTR(kIOHIDTransportBluetoothLowEnergyValue), 0); + if (desc.usages.UsagePage != HID_USAGE_PAGE_GENERIC || !(desc.usages.Usage == HID_USAGE_GENERIC_JOYSTICK || desc.usages.Usage == HID_USAGE_GENERIC_GAMEPAD)) { diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 3bffc5d56a5..50321055586 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1312,6 +1312,7 @@ static void udev_add_device(struct udev_device *dev, int fd) get_device_subsystem_info(dev, "hid", &desc, &bus); get_device_subsystem_info(dev, "input", &desc, &bus); get_device_subsystem_info(dev, "usb", &desc, &bus); + if (bus == BUS_BLUETOOTH) desc.is_bluetooth = TRUE; subsystem = udev_device_get_subsystem(dev); if (!strcmp(subsystem, "hidraw")) diff --git a/dlls/winebus.sys/unixlib.h b/dlls/winebus.sys/unixlib.h index 753886304db..b38382cda2c 100644 --- a/dlls/winebus.sys/unixlib.h +++ b/dlls/winebus.sys/unixlib.h @@ -41,6 +41,7 @@ struct device_desc USAGE_AND_PAGE usages; BOOL is_gamepad; BOOL is_hidraw; + BOOL is_bluetooth; WCHAR manufacturer[MAX_PATH]; WCHAR product[MAX_PATH]; @@ -150,9 +151,9 @@ enum unix_funcs static inline const char *debugstr_device_desc(struct device_desc *desc) { if (!desc) return "(null)"; - return wine_dbg_sprintf("{vid %04x, pid %04x, version %04x, input %d, uid %08x, usage %04x:%04x, is_gamepad %u, is_hidraw %u}", + return wine_dbg_sprintf("{vid %04x, pid %04x, version %04x, input %d, uid %08x, usage %04x:%04x, is_gamepad %u, is_hidraw %u, is_bluetooth %u}", desc->vid, desc->pid, desc->version, desc->input, desc->uid, desc->usages.UsagePage, desc->usages.Usage, - desc->is_gamepad, desc->is_hidraw); + desc->is_gamepad, desc->is_hidraw, desc->is_bluetooth); } static inline BOOL is_xbox_gamepad(WORD vid, WORD pid)