[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] ioemu: fix mouse wheel



This patch fixes the usb mouse wheel of usb devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 1dcac7c92479 hw/usb-hid.c
--- a/hw/usb-hid.c      Mon Nov 10 10:45:28 2008 +0000
+++ b/hw/usb-hid.c      Thu Dec 11 17:37:20 2008 +0000
@@ -568,6 +568,7 @@
 
     dz = int_clamp(e->dz, -128, 127);
 
+    e->dz -= dz;
     if (s->xyrel) {
         dx = int_clamp(e->xdx, -128, 127);
         dy = int_clamp(e->ydy, -128, 127);
@@ -585,9 +586,6 @@
        /* that deals with this event */
        QUEUE_INCR(s->head);
     }
-
-    /* Appears we have to invert the wheel direction */
-    dz = 0 - dz;
 
     b = 0;
     if (e->buttons_state & MOUSE_EVENT_LBUTTON)
@@ -611,9 +609,6 @@
        break;
 
     case USB_TABLET:
-       /* Appears we have to invert the wheel direction */
-       dz = 0 - dz;
-
        buf[0] = b;
        buf[1] = dx & 0xff;
        buf[2] = dx >> 8;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.