summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-24 14:07:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-27 20:17:58 +1000
commit7c9e0b07780b664ebbcee2d6be4bce645cb8c5b2 (patch)
tree9ecf4927670d1c529ab80b6bf7be10f02e6a5d5a
parent1745808c2939d7dc08d3d8acae425e5eeb6a16ca (diff)
Xi: update axisVals with the right subpixel data.
Subpixel data in data_frac is stored as FP32.32, hence we need to get that down again before adding it to the current value. Reported-by: Thomas Jaeger Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 9bd08c690fc687c4d69bb70536f3079a9184476d)
-rw-r--r--Xi/exevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index b0e0ede6c..2673552ce 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -805,7 +805,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
{
/* XXX: Relative/Absolute mode */
v->axisVal[i] = event->valuators.data[i];
- v->axisVal[i] += event->valuators.data_frac[i];
+ v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
}
}