[PATCH 01/23] Adjust acceleration scheme for input ABI v14
Daniel Stone
daniel at fooishbar.org
Thu Jun 23 15:12:36 PDT 2011
v14 wants doubles, rather than floats, from acceleration schemes.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/synaptics.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/synaptics.c b/src/synaptics.c
index cf91b9f..8f4bca1 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -578,11 +578,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;
--
1.7.5.4
More information about the xorg-devel
mailing list