[PATCH libevdev 6/7] Make sure all EV_REP bits are set
Peter Hutterer
peter.hutterer at who-t.net
Sun Jul 28 21:06:36 PDT 2013
Current code was skipping REP_PERIOD
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
libevdev/libevdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c
index f83848a..eb7401a 100644
--- a/libevdev/libevdev.c
+++ b/libevdev/libevdev.c
@@ -228,7 +228,7 @@ libevdev_set_fd(struct libevdev* dev, int fd)
/* rep is a special case, always set it to 1 for both values if EV_REP is set */
if (bit_is_set(dev->bits, EV_REP)) {
- for (i = 0; i < REP_MAX; i++)
+ for (i = 0; i <= REP_MAX; i++)
set_bit(dev->rep_bits, i);
rc = ioctl(fd, EVIOCGREP, dev->rep_values);
if (rc < 0)
--
1.8.2.1
More information about the Input-tools
mailing list