[PATCH libevdev 6/7] Make sure all EV_REP bits are set
Benjamin Tissoires
benjamin.tissoires at gmail.com
Tue Jul 30 01:41:46 PDT 2013
On Mon, Jul 29, 2013 at 6:06 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> 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++)
Definitively, the previous patch should use REP_CNT (which can be used
here too).
Other than that:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>
> set_bit(dev->rep_bits, i);
> rc = ioctl(fd, EVIOCGREP, dev->rep_values);
> if (rc < 0)
> --
> 1.8.2.1
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools
More information about the Input-tools
mailing list