提交 35e83d10 编写于 作者: C Christian Burger 提交者: Gerd Hoffmann

input: fix jumpy mouse cursor with USB mouse emulation

Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800).
Signed-off-by: NChristian Burger <christian@krikkel.de>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 b3959efd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册