diff options
author | Ladi Prosek <lprosek@redhat.com> | 2016-04-08 17:21:33 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-04-13 15:52:28 +0200 |
commit | 0263b3a72fbd2ac9ba59ecc2449a9bc53ccf6fb3 (patch) | |
tree | 735ddcd826a5a287013d956a1f1e407c2741cb4b /hw/input | |
parent | 2d738374665ede5b7c08545e5b44a411e7c3e943 (diff) | |
download | qemu-0263b3a72fbd2ac9ba59ecc2449a9bc53ccf6fb3.zip qemu-0263b3a72fbd2ac9ba59ecc2449a9bc53ccf6fb3.tar.gz qemu-0263b3a72fbd2ac9ba59ecc2449a9bc53ccf6fb3.tar.bz2 |
virtio-input: fix emulated tablet axis ranges
The reported maximum was wrong. The X and Y coordinates are 0-based
so if size is 8000 maximum must be 7FFF.
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Message-id: 1460128893-10244-1-git-send-email-lprosek@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/input')
-rw-r--r-- | hw/input/virtio-input-hid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index fe6d37f..3ee0c18 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -484,12 +484,12 @@ static struct virtio_input_config virtio_tablet_config[] = { .select = VIRTIO_INPUT_CFG_ABS_INFO, .subsel = ABS_X, .size = sizeof(virtio_input_absinfo), - .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE), + .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE - 1), },{ .select = VIRTIO_INPUT_CFG_ABS_INFO, .subsel = ABS_Y, .size = sizeof(virtio_input_absinfo), - .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE), + .u.abs.max = const_le32(INPUT_EVENT_ABS_SIZE - 1), }, { /* end of list */ }, }; |