summaryrefslogtreecommitdiff
path: root/driver/xf86-input-vmmouse/src/vmmouse_client.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-08-23 15:46:08 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-08-23 15:46:08 +0000
commit1dc0e4e5ba3c8a7b9cf0739229c4ea43bc91a797 (patch)
tree5bfd90bdbb589d76e02fc035f78abee8101de818 /driver/xf86-input-vmmouse/src/vmmouse_client.c
parent1cd06c9934bba135c31a14587439ee4067564645 (diff)
xf86-input-vmmouse 12.5.1
Diffstat (limited to 'driver/xf86-input-vmmouse/src/vmmouse_client.c')
-rw-r--r--driver/xf86-input-vmmouse/src/vmmouse_client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/xf86-input-vmmouse/src/vmmouse_client.c b/driver/xf86-input-vmmouse/src/vmmouse_client.c
index 5f27e5416..f34c223b9 100644
--- a/driver/xf86-input-vmmouse/src/vmmouse_client.c
+++ b/driver/xf86-input-vmmouse/src/vmmouse_client.c
@@ -267,9 +267,11 @@ VMMouseClient_GetInput (PVMMOUSE_INPUT_DATA pvmmouseInput) {
pvmmouseInput->Flags = (packetInfo & 0xffff0000) >> 16;
pvmmouseInput->Buttons = (packetInfo & 0x0000ffff);
- pvmmouseInput->X = vmpc.out.vEbx & 0xffff;
- pvmmouseInput->Y = vmpc.out.vEcx & 0xffff;
+ /* Note that Z is always signed, and X/Y are signed in relative mode. */
+ pvmmouseInput->X = (int)vmpc.out.vEbx;
+ pvmmouseInput->Y = (int)vmpc.out.vEcx;
pvmmouseInput->Z = (int)vmpc.out.vEdx;
+
/*
* Return number of packets (including this one) in queue.
*/