summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-15 10:27:21 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-15 10:27:40 +1000
commit4f224f4da1405959b74c05d6b15469cf6c0c498f (patch)
tree7cc12c047cd9c5c725de4201aad5a00d27cb1c75
parent550a33ed79925501d9a5e8b73ef256fd9e0937b5 (diff)
Fix wrong raw_valuator wire copy, add fractional parts.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/XExtInt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 7980340..26cc6e4 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1574,7 +1574,9 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
for (i = 0; i < bits; i++)
{
out->valuators.values[i] = values->integral;
- out->raw_values[i] = (values + len)->integral;
+ out->valuators.values[i] += ((double)values->frac / (1 << 16) / (1 << 16));
+ out->raw_values[i] = (values + bits)->integral;
+ out->valuators.values[i] += ((double)(values + bits)->frac / (1 << 16) / (1 << 16));
values++;
}