diff options
author | Pete Batard <pbatard@gmail.com> | 2010-02-08 20:07:15 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-02-08 20:07:15 +0000 |
commit | 15e2be512b12f8ee795af66b0827dd7adb74f173 (patch) | |
tree | 01a8629730b035994aaef9cf30de4454f0c67734 /libusb | |
parent | fe8e7eff48d0b21dc477a894c0bb41909dec794b (diff) | |
download | libusb-r144.tar.gz |
r144: preliminary fix for composite HID mouse and keyboard detectionr144
Diffstat (limited to 'libusb')
-rw-r--r-- | libusb/os/windows_usb.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 7ca245c..176c5db 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1021,6 +1021,8 @@ enum libusb_hid_report_type { if (dev_interface_details == NULL) break; +// usbi_dbg("processing: %s", dev_interface_details->DevicePath); + // HID devices (and possibly other classes) have an extra indirection // for an USB path we can recognize if (j == HID_DEVICE_INTERFACE_GUID_INDEX) { @@ -1053,6 +1055,15 @@ enum libusb_hid_report_type { driver[0] = 0; } +// usbi_dbg("driver: %s", driver); + // Temporary fix for composite mouse and hid keyboards + // TODO: something better + if (safe_strcmp(driver, "kbdhid") == 0) { + strcpy(driver, "HidUsb"); + } else if (safe_strcmp(driver, "mouhid") == 0) { + strcpy(driver, "HidUsb"); + } + for (api=USB_API_WINUSB; api<USB_API_MAX; api++) { if ( (safe_strcmp(driver, usb_api_backend[api].driver_name) == 0) || (guid_eq(&class_guid, usb_api_backend[api].class_guid)) ) { |