[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 7/9] virtio-input: fix emulated tablet axis ranges
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL v2 7/9] virtio-input: fix emulated tablet axis ranges |
Date: |
Wed, 13 Apr 2016 17:45:01 +0200 |
From: Ladi Prosek <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/input/virtio-input-hid.c | 4 ++--
1 file 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 */ },
};
--
1.8.3.1
- [Qemu-devel] [PULL v2 0/9] virtio-input; live migration support, various bugfixes, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 7/9] virtio-input: fix emulated tablet axis ranges,
Gerd Hoffmann <=
- [Qemu-devel] [PULL v2 9/9] virtio-input: support absolute axis config in pass-through, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 6/9] virtio-input: add live migration support, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 2/9] move const_le{16, 23} to qemu/bswap.h, add comment, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 1/9] virtio-input: add parenthesis to const_le{16, 32}, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 3/9] virtio-input: add missing key mappings, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 8/9] input-linux: refine mouse detection, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 5/9] virtio-input: implement pass-through evdev writes, Gerd Hoffmann, 2016/04/13
- [Qemu-devel] [PULL v2 4/9] virtio-input: retrieve EV_LED host config bits, Gerd Hoffmann, 2016/04/13