[PATCH 1/4] Add ABS_MT_MAX to build with old input.h

Martin Minarik minarik11 at student.fiit.stuba.sk
Fri Sep 6 17:25:53 PDT 2013


Enables build on kernels that didn't have ABS_MT_TOOL_Y

Signed-off-by: Martin Minarik <minarik11 at student.fiit.stuba.sk>

---
 libevdev/libevdev-int.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libevdev/libevdev-int.h b/libevdev/libevdev-int.h
index 7f21060..ce044e3 100644
--- a/libevdev/libevdev-int.h
+++ b/libevdev/libevdev-int.h
@@ -35,7 +35,11 @@
 #define MAX_NAME 256
 #define MAX_SLOTS 32
 #define ABS_MT_MIN ABS_MT_SLOT
-#define ABS_MT_MAX ABS_MT_TOOL_Y
+#ifdef ABS_MT_DISTANCE
+	#define ABS_MT_MAX ABS_MT_DISTANCE
+#else
+	#define ABS_MT_MAX ABS_MT_TOOL_Y
+#endif
 #define ABS_MT_CNT (ABS_MT_MAX - ABS_MT_MIN + 1)
 #define LIBEVDEV_EXPORT __attribute__((visibility("default")))
 #define LIBEVDEV_PRINTF(_format, _args) __attribute__ ((format (printf, _format, _args)))
-- 
1.7.10.4



More information about the Input-tools mailing list