summaryrefslogtreecommitdiff
path: root/src/hwstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hwstate.c')
-rw-r--r--src/hwstate.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/hwstate.c b/src/hwstate.c
index 50e34de..40cef5b 100644
--- a/src/hwstate.c
+++ b/src/hwstate.c
@@ -30,11 +30,6 @@ void init_hwstate(struct HWState *s)
30 memset(s, 0, sizeof(struct HWState)); 30 memset(s, 0, sizeof(struct HWState));
31} 31}
32 32
33static int fincmp(const void *a, const void *b)
34{
35 return ((struct FingerState *)a)->id - ((struct FingerState *)b)->id;
36}
37
38static inline int clamp15(int x) 33static inline int clamp15(int x)
39{ 34{
40 return x < -XMAX ? -XMAX : x > XMAX ? XMAX : x; 35 return x < -XMAX ? -XMAX : x > XMAX ? XMAX : x;
@@ -91,7 +86,4 @@ void modify_hwstate(struct HWState *s,
91 s->button = hw->button; 86 s->button = hw->button;
92 s->nfinger = hw->nfinger; 87 s->nfinger = hw->nfinger;
93 s->evtime = hw->evtime; 88 s->evtime = hw->evtime;
94
95 /* sort fingers in touching order */
96 qsort(s->finger, s->nfinger, sizeof(struct FingerState), fincmp);
97} 89}