summaryrefslogtreecommitdiff
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-24 04:07:26 (GMT)
committer Peter Hutterer <peter.hutterer@who-t.net>2009-09-26 02:25:18 (GMT)
commit9bd08c690fc687c4d69bb70536f3079a9184476d (patch) (side-by-side diff)
tree7e5f6b7735b833b9184a0524886ccae9cb9653dc
parentabb8108fb44cc9b08fe4ae7d805a0a22564ca6bb (diff)
downloadxserver-9bd08c690fc687c4d69bb70536f3079a9184476d.zip
xserver-9bd08c690fc687c4d69bb70536f3079a9184476d.tar.gz
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>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Xi/exevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index b0e0ede..2673552 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));
}
}