mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-02-16 09:40:36 +01:00
Allow enabling of EV_SYN codes
Has no effect, but allow it nonetheless to avoid superfluous conditions in client code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
parent
ca6082a946
commit
b311e74d6e
1 changed files with 3 additions and 0 deletions
|
|
@ -855,6 +855,9 @@ libevdev_enable_event_code(struct libevdev *dev, unsigned int type,
|
|||
if (type != EV_ABS && data != NULL)
|
||||
return -1;
|
||||
|
||||
if (type == EV_SYN)
|
||||
return 0;
|
||||
|
||||
max = type_to_mask(dev, type, &mask);
|
||||
|
||||
if (code > max)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue