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 7c0361d4ec)
This commit is contained in:
Daniel Stone
2011-06-09 20:03:05 +01:00
committed by Peter Hutterer
parent 75550077e6
commit 9a71f6dc88

View File

@@ -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;