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>2012-03-26 10:58:38 +1000
commit9a71f6dc88152f2599a8752ccdca1b09e6e975e4 (patch)
tree051a482b22f70bf12b8d15ba5a86de8183b67f0f
parent75550077e66cb8bdf15d6e1cf5b28f884f508fc5 (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> (cherry picked from commit 7c0361d4ec6b1f1325cb6551d0ee2e7f5cfae15b)
-rw-r--r--src/synaptics.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index a8e9063..14c869a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -585,11 +585,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;