summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/dev-unifying.c1
-rw-r--r--hw/usb/hid-logitech-dj.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb/dev-unifying.c b/hw/usb/dev-unifying.c
index 926e2f7e56..0eb0ebe5af 100644
--- a/hw/usb/dev-unifying.c
+++ b/hw/usb/dev-unifying.c
@@ -358,6 +358,7 @@ static void usb_ltunify_hid_event(HIDState *hs)
if (s->devices[ifnum].mode == LTUNIFY_MODE_HID) {
usb_wakeup(s->intr[ifnum], 0);
} else {
+ assert(s->devices[ifnum].mode == LTUNIFY_MODE_DJ);
usb_wakeup(s->intr[IFACE_HIDPP], 0);
}
}
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c
index f01a4f312f..5f1bc80f56 100644
--- a/hw/usb/hid-logitech-dj.c
+++ b/hw/usb/hid-logitech-dj.c
@@ -487,8 +487,8 @@ static void hidpp_handle_hid(USBDevice *dev, USBPacket *p)
for (i = 0; i < MAX_DEVICES; i++) {
LHidDevice *hd = &s->devices[i];
- /* ignore empty slots and unreachable devices */
- if (!hd->info.device_type || !hd->powered_on) {
+ /* ignore empty slots and unreachable/HID mode devices */
+ if (!hd->info.device_type || !hd->powered_on || hd->mode != LTUNIFY_MODE_DJ) {
continue;
}