summaryrefslogtreecommitdiff
path: root/hw/usb/hid-logitech-dj.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-03-19 21:56:09 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-03-19 21:56:09 +0100
commitd320b593b55739db798047b1623eaf228524f5ed (patch)
tree3c9497b76565fdf0d3768b85e7663f25843ca35b /hw/usb/hid-logitech-dj.c
parent8f818c2670838ff841c2979f13b787fff33c8654 (diff)
downloadqemu-d320b593b55739db798047b1623eaf228524f5ed.tar.gz
unifying: fix mixup of reporting flags, HidppMsg tweaks
The "address" and "value" split for short and long HID++ messages only make sense for HID++ 1.0 register accesses. For others, use "params". Also fix a mixup of reporting flags. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw/usb/hid-logitech-dj.c')
-rw-r--r--hw/usb/hid-logitech-dj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c
index 551ed768ee..d8bcbb06d7 100644
--- a/hw/usb/hid-logitech-dj.c
+++ b/hw/usb/hid-logitech-dj.c
@@ -73,10 +73,10 @@ static void hidpp_queue_error(USBLtunifyState *s, HidppMsg *msg, uint8_t err)
report->report_id = HIDPP_SHORT;
report->device_index = msg->device_index;
report->sub_id = 0x8F;
- report->address = msg->hidpp_s.sub_id;
- report->value[0] = msg->hidpp_s.address;
- report->value[1] = err;
- report->value[2] = 0;
+ report->params[0] = msg->hidpp_s.sub_id;
+ report->params[1] = msg->hidpp_s.address;
+ report->params[2] = err;
+ report->params[3] = 0;
}
}
@@ -168,7 +168,7 @@ static bool hidpp_process_receiver_report(USBLtunifyState *s, HidppMsg *msg)
break;
case SET_REG(0x00): /* Enable HID++ notifs */
rcvr->reporting_flags = ms->value[1];
- rcvr->reporting_flags &= REPORTING_FLAG_RECV_MASK;
+ rcvr->reporting_flags &= REPORTING_FLAG_RCV_MASK;
memset(ms->value, 0, 3);
hidpp_queue_output_report(s, msg);
break;