diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-06-15 20:24:14 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-06-16 02:28:08 +0200 |
| commit | 78085b21f2dc7b1d49a0c54ab56b567fc195d440 (patch) | |
| tree | 3ae649c25b380114ce2eaa5463350fb9b29ee78c /include/mtstate.h | |
| parent | 4583da1ad81b59b2a8cd2ae51c32b1bc8d32f1c4 (diff) | |
refactor: Simplify capabilities
Use the generated abs2mt mapping to simplify the MT device
capabilities.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/mtstate.h')
| -rw-r--r-- | include/mtstate.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/mtstate.h b/include/mtstate.h index ac0b18d..b5f5dd1 100644 --- a/include/mtstate.h +++ b/include/mtstate.h | |||
| @@ -54,8 +54,7 @@ static inline int center_dist2(const struct MTFinger *a, | |||
| 54 | 54 | ||
| 55 | static inline int center_maxdist2(const struct Capabilities *caps) | 55 | static inline int center_maxdist2(const struct Capabilities *caps) |
| 56 | { | 56 | { |
| 57 | return dist2(caps->abs_position_x.maximum - get_cap_xmid(caps), | 57 | return dist2(get_cap_xsize(caps) / 2, get_cap_ysize(caps) / 2); |
| 58 | caps->abs_position_y.maximum - get_cap_ymid(caps)); | ||
| 59 | } | 58 | } |
| 60 | 59 | ||
| 61 | #endif | 60 | #endif |
