diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-03-31 12:50:13 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-12-12 17:44:11 +0100 |
commit | d2d339e940c76a878f71b76655984ae86d83f77d (patch) | |
tree | a02a802508f0b1b7ee5e5845a7d3f45af47f0d1d | |
parent | 1a5810bf0462899e519cc6e093e30f65905e8a33 (diff) | |
download | qemu-d2d339e940c76a878f71b76655984ae86d83f77d.tar.gz |
unifying: Fix PID of T650 touchpad
Also safe-guard against missing feature array for HID++ 2.0 devices.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | hw/usb/hid-logitech-dj.c | 2 | ||||
-rw-r--r-- | hw/usb/hid-logitech-hidpp20.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c index 0728be47f6..fd49d178da 100644 --- a/hw/usb/hid-logitech-dj.c +++ b/hw/usb/hid-logitech-dj.c @@ -614,7 +614,7 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype) /* TODO: perhaps "unpair" mouse and use this touchpad instead? */ hd->hid = &s->hid[IFACE_MSE]; hd->info.report_types = 0x0e; /* Keyboard, Mouse, Consumer Ctrl */ - hd->info.wireless_pid = 0x4026; + hd->info.wireless_pid = 0x4101; hd->info.serial = 0x4f4f4f48; memcpy(hd->info.name, "T650", 4); hd->info.device_name = "Rechargeable Touchpad T650"; diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c index 4e43eb26a1..a3a50e6cd3 100644 --- a/hw/usb/hid-logitech-hidpp20.c +++ b/hw/usb/hid-logitech-hidpp20.c @@ -317,10 +317,13 @@ void hidpp20_init_features(LHidDevice *hd) { hd->info.features = features_m525; hd->info.features_count = ARRAY_SIZE(features_m525); break; - case 0x4026: + case 0x4101: hd->info.features = features_t650; hd->info.features_count = ARRAY_SIZE(features_t650); break; + default: + /* HID++ 2.0 devices must always supply features */ + assert(!(hd->info.protocol_version >= 0x0200)); } } |