mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 12:20:05 +01:00
Rename ER_SYNC flag to LIBEVDEV_READ_SYNC
ER dated to an earlier version of this library called libevdev_read. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ee054e9cf9
commit
05ba468a27
3 changed files with 4 additions and 6 deletions
|
|
@ -524,7 +524,7 @@ int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_e
|
|||
if (dev->fd < 0)
|
||||
return -ENODEV;
|
||||
|
||||
if (flags & ER_SYNC) {
|
||||
if (flags & LIBEVDEV_READ_SYNC) {
|
||||
if (!dev->need_sync && dev->queue_nsync == 0)
|
||||
return -EAGAIN;
|
||||
else if (dev->need_sync) {
|
||||
|
|
@ -552,7 +552,7 @@ int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_e
|
|||
rc = 1;
|
||||
}
|
||||
|
||||
if (flags & ER_SYNC && dev->queue_nsync > 0) {
|
||||
if (flags & LIBEVDEV_READ_SYNC && dev->queue_nsync > 0) {
|
||||
dev->queue_nsync--;
|
||||
rc = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
struct libevdev;
|
||||
|
||||
enum EvdevReadFlags {
|
||||
ER_SINGLE = 1, /**< Read until including the first EV_SYN or EAGAIN */
|
||||
ER_SYNC = 2, /**< Process data in sync mode */
|
||||
ER_ALL = 4, /**< Read until EAGAIN */
|
||||
LIBEVDEV_READ_SYNC = 1, /**< Process data in sync mode */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ main(int argc, char **argv)
|
|||
printf("::::::::::::::::::::: dropped ::::::::::::::::::::::\n");
|
||||
while (rc == 1) {
|
||||
print_sync_event(&ev);
|
||||
rc = libevdev_next_event(dev, ER_SYNC, &ev);
|
||||
rc = libevdev_next_event(dev, LIBEVDEV_READ_SYNC, &ev);
|
||||
}
|
||||
printf("::::::::::::::::::::: re-synced ::::::::::::::::::::::\n");
|
||||
} else if (rc == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue