aboutsummaryrefslogtreecommitdiff
path: root/hw/input/hid.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-07-01 16:16:19 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-07-01 16:16:19 +0100
commit596742db3341390dfd386ec434165e0118cfc0f8 (patch)
tree964e2b07cd1df95fc10feae5c970ab48a01202ac /hw/input/hid.c
parentf9119a25729644300046efda3dd9f50d68fe2106 (diff)
parentc1129f6bffb6fc756f53c06bc554a7997b1f4be4 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20140701-1' into staging
usb bugfixes. # gpg: Signature made Tue 01 Jul 2014 14:51:19 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20140701-1: ccid-card-emulated: use EventNotifier usb: initialize libusb_device to avoid crash usb: Fix usb-bt-dongle initialization. input: fix jumpy mouse cursor with USB mouse emulation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/input/hid.c')
-rw-r--r--hw/input/hid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/input/hid.c b/hw/input/hid.c
index 9656e90c59..148c003bb2 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;