[PATCH 2/6] xfree86: dump the ptraccel filter setup to the log on init.

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 4 22:42:34 PST 2008


From: Simon Thum <simon.thum at gmx.de>

Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
---
 hw/xfree86/common/xf86Xinput.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 6b92acb..fe62772 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -126,9 +126,14 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
     if(tempf > 0.0f && tempi >= 1 && tempf2 >= 1.0f)
 	InitFilterChain(s, tempf, tempf2, tempi, 40);
 
-    for(i = 0; i < tempi; i++)
-	xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n",
+    /* dump filter setup to log */
+    for(i = 0; i < MAX_VELOCITY_FILTERS; i++){
+	if(s->filters[i].rdecay <= 0)
+	    break;
+
+        xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n",
                 devname, i, 1.0f / (s->filters[i].rdecay));
+    }
 
     tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
     if(tempf > 1.0){
-- 
1.6.0.4




More information about the xorg mailing list