summaryrefslogtreecommitdiffstats
path: root/minui/events.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 22:12:05 +0200
committerElliott Hughes <enh@google.com>2015-04-10 22:42:55 +0200
commit07cfb8fe799901948afd6af05ef4674173713bcb (patch)
treedbb3c6ea45cb910397cec50054460d46c99b454f /minui/events.cpp
parentMerge "Fix ScreenRecoveryUI to handle devices without power/up/down." (diff)
downloadandroid_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.gz
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.bz2
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.lz
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.xz
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.zst
android_bootable_recovery-07cfb8fe799901948afd6af05ef4674173713bcb.zip
Diffstat (limited to 'minui/events.cpp')
-rw-r--r--minui/events.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/minui/events.cpp b/minui/events.cpp
index daa10c6cf..2d47a587f 100644
--- a/minui/events.cpp
+++ b/minui/events.cpp
@@ -39,10 +39,10 @@ struct fd_info {
};
static int g_epoll_fd;
-static struct epoll_event polledevents[MAX_DEVICES + MAX_MISC_FDS];
+static epoll_event polledevents[MAX_DEVICES + MAX_MISC_FDS];
static int npolledevents;
-static struct fd_info ev_fdinfo[MAX_DEVICES + MAX_MISC_FDS];
+static fd_info ev_fdinfo[MAX_DEVICES + MAX_MISC_FDS];
static unsigned ev_count = 0;
static unsigned ev_dev_count = 0;
@@ -62,7 +62,7 @@ int ev_init(ev_callback input_cb, void* data) {
DIR* dir = opendir("/dev/input");
if (dir != NULL) {
- struct dirent* de;
+ dirent* de;
while ((de = readdir(dir))) {
unsigned long ev_bits[BITS_TO_LONGS(EV_MAX)];
@@ -83,7 +83,7 @@ int ev_init(ev_callback input_cb, void* data) {
continue;
}
- struct epoll_event ev;
+ epoll_event ev;
ev.events = EPOLLIN | EPOLLWAKEUP;
ev.data.ptr = &ev_fdinfo[ev_count];
if (epoll_ctl(g_epoll_fd, EPOLL_CTL_ADD, fd, &ev) == -1) {
@@ -121,7 +121,7 @@ int ev_add_fd(int fd, ev_callback cb, void* data) {
return -1;
}
- struct epoll_event ev;
+ epoll_event ev;
ev.events = EPOLLIN | EPOLLWAKEUP;
ev.data.ptr = (void *)&ev_fdinfo[ev_count];
int ret = epoll_ctl(g_epoll_fd, EPOLL_CTL_ADD, fd, &ev);
@@ -163,7 +163,7 @@ void ev_dispatch(void) {
}
}
-int ev_get_input(int fd, uint32_t epevents, struct input_event* ev) {
+int ev_get_input(int fd, uint32_t epevents, input_event* ev) {
if (epevents & EPOLLIN) {
ssize_t r = read(fd, ev, sizeof(*ev));
if (r == sizeof(*ev)) {