aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-03-23 09:56:21 +0100
committerHenrik Rydberg <rydberg@euromail.se>2010-04-15 06:10:06 +0200
commitc25354f13a345a374585688d7ca7a7791fea1d9e (patch)
tree386eff6fd3227cb422c7e29a66d16678125b7b9c
parent7059d886007c71c34c02c9ad23498f740a85f5ef (diff)
downloadxorg-input-kobomultitouch-c25354f13a345a374585688d7ca7a7791fea1d9e.tar.gz
xorg-input-kobomultitouch-c25354f13a345a374585688d7ca7a7791fea1d9e.tar.bz2
xorg-input-kobomultitouch-c25354f13a345a374585688d7ca7a7791fea1d9e.zip
Third time around (and use the next branch for collaboration)
There is (obviously, from the recent commit flaws) a need to keep a volatile branch for collaboration, to allow for digested commits in master. The next branch will rebase occasionally, so one cannot rely on commit ids from that branch. This patch corrects the commit mistake for the third time, to never change that line again. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--src/state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state.c b/src/state.c
index b9b7bbc..72bb759 100644
--- a/src/state.c
+++ b/src/state.c
@@ -37,7 +37,7 @@ static int fincmp(const void *a, const void *b)
return ((struct FingerState *)a)->id - ((struct FingerState *)b)->id;
}
-inline int abs15(int x)
+static inline int clamp15(int x)
{
return x < -XMAX ? -XMAX : x > XMAX ? XMAX : x;
}
@@ -45,8 +45,8 @@ inline int abs15(int x)
/* abslute scale is assumed to fit in 15 bits */
inline int dist2(const struct FingerData *a, const struct FingerData *b)
{
- int dx = abs15(a->position_x - b->position_x);
- int dy = abs15(a->position_y - b->position_y);
+ int dx = clamp15(a->position_x - b->position_x);
+ int dy = clamp15(a->position_y - b->position_y);
return dx * dx + dy * dy;
}