aboutsummaryrefslogtreecommitdiffstats
path: root/libgamepad_next_event.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-26 16:10:41 +0200
committerMattias Andrée <maandree@kth.se>2022-07-26 16:14:00 +0200
commit08184b90b04961086e7b00650651188a9652a0c5 (patch)
tree204dd698fd9efb83955ad58506018591cc56ca59 /libgamepad_next_event.c
parentDo not relay on libevdev for button/axis names, an prepare for device specific names, and add reverse lookup functions (diff)
downloadlibgamepad-08184b90b04961086e7b00650651188a9652a0c5.tar.gz
libgamepad-08184b90b04961086e7b00650651188a9652a0c5.tar.bz2
libgamepad-08184b90b04961086e7b00650651188a9652a0c5.tar.xz
Hide implementation details
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamepad_next_event.c')
-rw-r--r--libgamepad_next_event.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgamepad_next_event.c b/libgamepad_next_event.c
index acc23ea..c74d641 100644
--- a/libgamepad_next_event.c
+++ b/libgamepad_next_event.c
@@ -8,23 +8,23 @@ libgamepad_next_event(struct libgamepad_device *device, struct libgamepad_input_
int r;
struct input_event ev;
- if (!device->require_sync) {
- r = libevdev_next_event(device->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
+ if (!device->internals->require_sync) {
+ r = libevdev_next_event(device->internals->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
if (r < 0) {
errno = -r;
return -1;
}
} else {
- r = libevdev_next_event(device->dev, LIBEVDEV_READ_FLAG_SYNC, &ev);
+ r = libevdev_next_event(device->internals->dev, LIBEVDEV_READ_FLAG_SYNC, &ev);
if (r == -EAGAIN) {
- device->require_sync = 0; /* yes, this is how it is document */
+ device->internals->require_sync = 0; /* yes, this is how it is document */
return 0;
} else if (r < 0) {
errno = -r;
return -1;
}
if (r != LIBEVDEV_READ_STATUS_SYNC) /* just to be safe */
- device->require_sync = 0;
+ device->internals->require_sync = 0;
}
eventp->sync_event = (r == LIBEVDEV_READ_STATUS_SYNC);
@@ -48,7 +48,7 @@ libgamepad_next_event(struct libgamepad_device *device, struct libgamepad_input_
case EV_SYN:
if (ev.code == SYN_DROPPED)
- device->require_sync = 1;
+ device->internals->require_sync = 1;
return 0;
default: