From 9cccf4cf2206a7ab4ebb75bd9ba87ec8a9d33328 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 24 Mar 2014 21:47:05 +0100 Subject: unifying: mouse compat with Win guests, other mouse fixes Two stupid mistakes slipped in while refactoring the HID report generation in 3615170bd1ed6f09f878a8b538321044efddd8e0 ("unifying: fix mouse report format, DRY"). This makes evtest in Linux report mouse events again and openbox seems happy too. Another mistake went in the calculation of the Y field, the high and low bits of Y were accidentally swapped. As the descriptor for interface 2 (mouse, etc.) includes Report IDs, this ID must be prepended to the HID payload for mice reports. This makes the mouse function for Windows guests. (See section 8.1 of HID 1.11). Signed-off-by: Peter Wu --- hw/usb/hid-logitech-dj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 5f1bc80f56..bc293a2dc5 100644 --- a/hw/usb/hid-logitech-dj.c +++ b/hw/usb/hid-logitech-dj.c @@ -493,7 +493,7 @@ static void hidpp_handle_hid(USBDevice *dev, USBPacket *p) } if (usb_ltunify_poll_hid(hd->hid, hid_data, sizeof(msg.payload)) <= 0) { - return; + continue; } msg.device_index = i + 1; -- cgit v1.2.1