summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-02-27 14:35:35 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-03-06 09:21:02 +1000
commitf3f31b47fc8c397e5266747b13ce3e423e0577fa (patch)
tree559b34b2ec9e0f495c813594af90444646cf582d
parentd596bd7a3275f370ae9689f6cb5f63041f5850ed (diff)
downloadlibevdev-f3f31b47fc8c397e5266747b13ce3e423e0577fa.tar.gz
Increase MAX_SLOTS to 60
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@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
-rw-r--r--libevdev/libevdev-int.h2
-rw-r--r--libevdev/libevdev.h2
-rw-r--r--test/test-libevdev-events.c2
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 b13e746..eab02ba 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 899bd29..b9945b4 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)
{