Make sure all EV_REP bits are set

Current code was skipping REP_PERIOD

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Peter Hutterer 2013-07-29 12:04:58 +10:00
parent 3e795ea509
commit fc7c3b73a4

View file

@ -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_CNT; i++)
set_bit(dev->rep_bits, i);
rc = ioctl(fd, EVIOCGREP, dev->rep_values);
if (rc < 0)