summaryrefslogtreecommitdiffstats
path: root/minui/events.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 22:57:37 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-10 22:57:37 +0200
commit23017c5d5c145a1040ee49466d30489d6e11bb61 (patch)
treedbb3c6ea45cb910397cec50054460d46c99b454f /minui/events.cpp
parentMerge "Fix ScreenRecoveryUI to handle devices without power/up/down." (diff)
parentSwitch minui over to C++. (diff)
downloadandroid_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.gz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.bz2
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.lz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.xz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.zst
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.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)) {