[PATCH 11/15] Adjust acceleration scheme for input ABI v14
Daniel Stone
daniel at fooishbar.org
Thu Jun 9 12:57:32 PDT 2011
v14 wants doubles, rather than floats, from acceleration schemes.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
src/synaptics.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/synaptics.c b/src/synaptics.c
index 7a540ae..d732f8a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -587,11 +587,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.3
More information about the xorg-devel
mailing list