summaryrefslogtreecommitdiffstats
path: root/minui/events.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 22:26:52 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-10 22:26:53 +0200
commit5d1630a926a02ca13a66eb1e385eabba16b04cfc (patch)
tree7e8d33676678e2240d5368fca8465712b24285cd /minui/events.cpp
parentMerge "Move "Mount /system" to the main menu." (diff)
parentFix ScreenRecoveryUI to handle devices without power/up/down. (diff)
downloadandroid_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar.gz
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar.bz2
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar.lz
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar.xz
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.tar.zst
android_bootable_recovery-5d1630a926a02ca13a66eb1e385eabba16b04cfc.zip
Diffstat (limited to '')
-rw-r--r--minui/events.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/minui/events.cpp b/minui/events.cpp
index 2c41eb8a7..daa10c6cf 100644
--- a/minui/events.cpp
+++ b/minui/events.cpp
@@ -201,7 +201,7 @@ int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data) {
return 0;
}
-void ev_iterate_available_keys(ev_key_callback cb, void* data) {
+void ev_iterate_available_keys(std::function<void(int)> f) {
unsigned long ev_bits[BITS_TO_LONGS(EV_MAX)];
unsigned long key_bits[BITS_TO_LONGS(KEY_MAX)];
@@ -224,7 +224,7 @@ void ev_iterate_available_keys(ev_key_callback cb, void* data) {
for (int key_code = 0; key_code <= KEY_MAX; ++key_code) {
if (test_bit(key_code, key_bits)) {
- cb(key_code, data);
+ f(key_code);
}
}
}