summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-06-09 20:03:05 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-18 16:07:28 +1000
commit7c0361d4ec6b1f1325cb6551d0ee2e7f5cfae15b (patch)
treef7a7c2eefcc03f4ee520a9972f809c1a4b1bd52d
parenta15af628154ac37f24896a30614f3be6ecdb65c4 (diff)
Adjust acceleration scheme for input ABI v14
v14 wants doubles, rather than floats, from acceleration schemes. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index c44d1f7..e05147e 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -593,11 +593,22 @@ static void set_default_parameters(InputInfoPtr pInfo)
}
}
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
+static double SynapticsAccelerationProfile(DeviceIntPtr dev,
+ DeviceVelocityPtr vel,
+ double velocity,
+ double thr,
+ double acc) {
+#else
static float SynapticsAccelerationProfile(DeviceIntPtr dev,
DeviceVelocityPtr vel,
- float velocity,
- float thr,
- float acc) {
+ float velocity_f,
+ float thr_f,
+ float acc_f) {
+ double velocity = velocity_f;
+ double thr = thr_f;
+ double acc = acc_f;
+#endif
InputInfoPtr pInfo = dev->public.devicePrivate;
SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
SynapticsParameters* para = &priv->synpara;