[PATCH] xfree86: Parse adaptive and constant deceleration as floats.

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 16 00:26:35 PDT 2008


They are stored in floats, so we might as well take them like they are. Plus,
this way keith's mouse can be configured to his liking.

Spotted by Keith Packard.
---
 hw/xfree86/common/xf86Xinput.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 8eaa118..a1d9f67 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -124,7 +124,7 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
 	xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n",
                 devname, i, 1.0f / (s->filters[i].rdecay));
 
-    tempf = xf86SetIntOption(list, "ConstantDeceleration", 1);
+    tempf = xf86SetRealOption(list, "ConstantDeceleration", 1);
     if(tempf > 1.0){
         xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n",
                 devname, tempf);
@@ -132,7 +132,7 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
                                                   alias acceleration */
     }
 
-    tempf = xf86SetIntOption(list, "AdaptiveDeceleration", 1);
+    tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1);
     if(tempf > 1.0){
         xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n",
                 devname, tempf);
-- 
1.5.4.3



More information about the xorg mailing list