[PATCH libevdev 5/5] Increase MAX_SLOTS to 60

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 26 22:27:07 PST 2014


As seen on 3M devices, which seems to be the maximum seen so far. Some Stantum
devices report 255 touches but are only capable of 10, so the are not affected
by our limits.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 libevdev/libevdev-int.h     | 2 +-
 libevdev/libevdev.h         | 2 +-
 test/test-libevdev-events.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libevdev/libevdev-int.h b/libevdev/libevdev-int.h
index 42141ca..2bc8750 100644
--- a/libevdev/libevdev-int.h
+++ b/libevdev/libevdev-int.h
@@ -34,7 +34,7 @@
 #define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
 #define ARRAY_LENGTH(a) (sizeof(a) / (sizeof((a)[0])))
 #define MAX_NAME 256
-#define MAX_SLOTS 32
+#define MAX_SLOTS 60
 #define ABS_MT_MIN ABS_MT_SLOT
 #define ABS_MT_MAX ABS_MT_TOOL_Y
 #define ABS_MT_CNT (ABS_MT_MAX - ABS_MT_MIN + 1)
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h
index 06d2dfa..f975e42 100644
--- a/libevdev/libevdev.h
+++ b/libevdev/libevdev.h
@@ -695,7 +695,7 @@ enum libevdev_read_status {
  * have been synced.
  * @note The implementation of libevdev limits the maximum number of slots
  * that can be synched. If your device exceeds the number of slots
- * (currently 32), slot indices equal and above this maximum are ignored and
+ * (currently 60), slot indices equal and above this maximum are ignored and
  * their value will not update until the next event in that slot.
  *
  * If a device needs to be synced by the caller but the caller does not call
diff --git a/test/test-libevdev-events.c b/test/test-libevdev-events.c
index 87e5238..ae7cb41 100644
--- a/test/test-libevdev-events.c
+++ b/test/test-libevdev-events.c
@@ -29,7 +29,7 @@
 
 #include "test-common.h"
 
-#define MAX_SLOTS 32 /* as in libevdev-int.h */
+#define MAX_SLOTS 60 /* as in libevdev-int.h */
 
 START_TEST(test_next_event)
 {
-- 
1.8.4.2



More information about the Input-tools mailing list