qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] input: fix jumpy mouse cursor with USB mouse em


From: Benjamin Herrenschmidt
Subject: Re: [Qemu-devel] [PATCH] input: fix jumpy mouse cursor with USB mouse emulation
Date: Mon, 23 Jun 2014 14:43:17 +1000

On Sat, 2014-06-14 at 20:19 +0100, Christian Burger wrote:
> Guest mouse pointer was jumpy, when moving host mouse in the vertical 
> direction (see bug #1327800).

Ah, I've just done a deep dive into qemu input code to debug that
one as well :-)

It's not just "jumpy", it goes the wrong way around too...

> Signed-off-by: Christian Burger <address@hidden>

Tested-by: Benjamin Herrenschmidt <address@hidden>

> ---
>  hw/input/hid.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/input/hid.c b/hw/input/hid.c
> index 295bdab..c58847e 100644
> --- a/hw/input/hid.c
> +++ b/hw/input/hid.c
> @@ -124,7 +124,7 @@ static void hid_pointer_event(DeviceState *dev, 
> QemuConsole *src,
>          if (evt->rel->axis == INPUT_AXIS_X) {
>              e->xdx += evt->rel->value;
>          } else if (evt->rel->axis == INPUT_AXIS_Y) {
> -            e->ydy -= evt->rel->value;
> +            e->ydy += evt->rel->value;
>          }
>          break;
>  
> @@ -191,7 +191,7 @@ static void hid_pointer_sync(DeviceState *dev)
>          if (hs->kind == HID_MOUSE) {
>              prev->xdx += curr->xdx;
>              curr->xdx = 0;
> -            prev->ydy -= curr->ydy;
> +            prev->ydy += curr->ydy;
>              curr->ydy = 0;
>          } else {
>              prev->xdx = curr->xdx;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]