summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-20 16:42:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commitffe20acedb3cdc4811eb52f8fc540ba6af7339fa (patch)
treeb5f12d6b17bb7f42190e54e912b6aea1c68d15d6 /Xi
parent7500d841f4c709ae0edc6420332096d3b9ef9fcc (diff)
Use new FP1616/FP3232 conversion functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xiquerydevice.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 9961d1b6f..5f543f620 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -41,6 +41,7 @@
#include "xserver-properties.h"
#include "exevents.h"
#include "xace.h"
+#include "inpututils.h"
#include "xiquerydevice.h"
@@ -351,8 +352,7 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
info->min.frac = 0;
info->max.integral = v->axes[axisnumber].max_value;
info->max.frac = 0;
- info->value.integral = (int)v->axisVal[axisnumber];
- info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
+ info->value = double_to_fp3232(v->axisVal[axisnumber]);
info->resolution = v->axes[axisnumber].resolution;
info->number = axisnumber;
info->mode = valuator_get_mode(dev, axisnumber);
@@ -402,8 +402,7 @@ ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo *info, int axisnumber)
ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", axis->scroll.type);
break;
}
- info->increment.integral = (int)axis->scroll.increment;
- info->increment.frac = (unsigned int)(axis->scroll.increment * (1UL << 16) * (1UL << 16));
+ info->increment = double_to_fp3232(axis->scroll.increment);
info->sourceid = v->sourceid;
info->flags = 0;