summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-04-01 21:38:39 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-04-01 21:38:39 +0200
commit47657c3997e08e98a406a81e02a05a683e94d39f (patch)
tree42eb249b0b37372579fa385d3dd9ba90c37033ea
parent92095d960146f62f24a124fb657b4ce3cb3c6b4b (diff)
downloadqemu-47657c3997e08e98a406a81e02a05a683e94d39f.tar.gz
unifying: fix keyboard LED for HID++ mode
-rw-r--r--hw/usb/hid-logitech-dj.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c
index 403d994457..0ab09f332d 100644
--- a/hw/usb/hid-logitech-dj.c
+++ b/hw/usb/hid-logitech-dj.c
@@ -163,7 +163,12 @@ static void hidpp_process_receiver_report(USBLtunifyState *s, HidppMsg *msg)
/* DJ reports */
switch (msg->dj_s.report_type) {
case 0x0E: /* Keyboard LEDs */
- /* ignored */
+ for (i = 0; i < MAX_DEVICES; i++) {
+ hd = &s->devices[i];
+ if (hd->hid && hd->hid->kind == HID_KEYBOARD) {
+ hid_keyboard_write(hd->hid, msg->dj_s.payload, 1);
+ }
+ }
break;
case 0x80: /* Switch and Keep-Alive */
for (i = 0; i < MAX_DEVICES; i++) {