From d320b593b55739db798047b1623eaf228524f5ed Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 19 Mar 2014 21:56:09 +0100 Subject: 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 --- hw/usb/hid-logitech-dj.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/usb/hid-logitech-dj.c') 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; -- cgit v1.2.1