ioemu: fix mouse wheel
PATCH 1/1 ioemu: fix mouse wheel
This patch fixes the usb mouse wheel of usb devices.
Signed-off-by Stefano Stabellini <[email protected]>
hw/usb-hid.c +1 -6
@@ -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 ;