From 9a71f6dc88152f2599a8752ccdca1b09e6e975e4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 9 Jun 2011 20:03:05 +0100 Subject: [PATCH] Adjust acceleration scheme for input ABI v14 v14 wants doubles, rather than floats, from acceleration schemes. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer (cherry picked from commit 7c0361d4ec6b1f1325cb6551d0ee2e7f5cfae15b) --- src/synaptics.c | 17 ++++++++++++++--- 1 file 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;