summaryrefslogtreecommitdiff
path: root/hw/usb/hid-logitech-dj.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/hid-logitech-dj.c')
-rw-r--r--hw/usb/hid-logitech-dj.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c
index 196b430c43..59bdc7f65c 100644
--- a/hw/usb/hid-logitech-dj.c
+++ b/hw/usb/hid-logitech-dj.c
@@ -583,13 +583,16 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype)
hd->info.device_type = devtype;
hd->info.protocol_type = PROTO_UNIFYING;
+ hd->info.protocol_version = 0x0200; /* HID++ 2.0 */
switch (devtype) {
case DEVTYPE_KEYBOARD:
+ hd->info.protocol_version = 0x0100; /* override: HID++ 1.0 */
hd->hid = &s->hid[IFACE_KBD];
hd->info.report_types = 0x1a; /* Keyboard, Consumer Control, System Control */
hd->info.wireless_pid = 0x2010;
hd->info.serial = 0x4b657973;
memcpy(hd->info.name, "K800", 4);
+ /* hd->info.device_name N/A for HID++ 1.0 */
hd->report_interval = 20;
break;
case DEVTYPE_MOUSE:
@@ -598,6 +601,7 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype)
hd->info.wireless_pid = 0x4013;
hd->info.serial = 0x52617473;
memcpy(hd->info.name, "M525", 4);
+ hd->info.device_name = "WirelessMouse M525";
hd->report_interval = 8;
break;
case DEVTYPE_TOUCHPAD:
@@ -607,11 +611,13 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype)
hd->info.wireless_pid = 0x4026;
hd->info.serial = 0x4f4f4f48;
memcpy(hd->info.name, "T650", 4);
+ hd->info.device_name = "Rechargeable Touchpad T650";
hd->report_interval = 8;
break;
}
- hidpp20_init_features(hd);
- hd->info.protocol_version = 0x0200; /* HID++ 2.0 */
+ if (hd->info.protocol_version >= 0x0200) {
+ hidpp20_init_features(hd);
+ }
hd->mode = LTUNIFY_MODE_HID;
hd->powered_on = true;
}