[PATCH 2/2] Xi: update axisVals with the right subpixel data.
Peter Hutterer
peter.hutterer at who-t.net
Wed Sep 23 22:43:59 PDT 2009
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 at who-t.net>
---
Xi/exevents.c | 2 +-
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));
}
}
--
1.6.3.rc1.2.g0164.dirty
More information about the xorg-devel
mailing list