[PATCH 16/20] dix: rename od, d to prev_delta, delta

Peter Hutterer peter.hutterer at who-t.net
Tue Apr 19 23:28:25 PDT 2011


And res to result.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/ptrveloc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 27def47..6de02d2 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -698,16 +698,16 @@ ProcessVelocityData2D(
  * constant-velocity response
  */
 static inline float
-ApplySimpleSoftening(int od, int d)
+ApplySimpleSoftening(int prev_delta, int delta)
 {
-    float res = d;
-    if (d <= 1 && d >= -1)
-        return res;
-    if (d > od)
-        res -= 0.5;
-    else if (d < od)
-        res += 0.5;
-    return res;
+    float result = delta;
+    if (delta <= 1 && delta >= -1)
+        return result;
+    if (delta > prev_delta)
+        result -= 0.5;
+    else if (delta < prev_delta)
+        result += 0.5;
+    return result;
 }
 
 
-- 
1.7.4.4



More information about the xorg-devel mailing list