diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 21:05:33 +0100 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 21:05:33 +0100 |
commit | b2ce982d432338d36a41bd57e35a14459fc3d30b (patch) | |
tree | 7fd574307953a0bbde499194ab4006a7cae3f8b9 /ui.c | |
parent | merge from donut (diff) | |
parent | eclair snapshot (diff) | |
download | android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar.gz android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar.bz2 android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar.lz android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar.xz android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.tar.zst android_bootable_recovery-b2ce982d432338d36a41bd57e35a14459fc3d30b.zip |
Diffstat (limited to '')
-rw-r--r-- | ui.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -27,6 +27,7 @@ #include "common.h" #include "minui/minui.h" +#include "recovery_ui.h" #define MAX_COLS 64 #define MAX_ROWS 32 @@ -307,20 +308,14 @@ static void *input_thread(void *cookie) } pthread_mutex_unlock(&key_queue_mutex); - // Alt+L or Home+End: toggle log display - int alt = key_pressed[KEY_LEFTALT] || key_pressed[KEY_RIGHTALT]; - if ((alt && ev.code == KEY_L && ev.value > 0) || - (key_pressed[KEY_HOME] && ev.code == KEY_END && ev.value > 0)) { + if (ev.value > 0 && device_toggle_display(key_pressed, ev.code)) { pthread_mutex_lock(&gUpdateMutex); show_text = !show_text; update_screen_locked(); pthread_mutex_unlock(&gUpdateMutex); } - // Green+Menu+Red: reboot immediately - if (ev.code == KEY_DREAM_RED && - key_pressed[KEY_DREAM_MENU] && - key_pressed[KEY_DREAM_GREEN]) { + if (ev.value > 0 && device_reboot_now(key_pressed, ev.code)) { reboot(RB_AUTOBOOT); } } @@ -344,7 +339,11 @@ void ui_init(void) for (i = 0; BITMAPS[i].name != NULL; ++i) { int result = res_create_surface(BITMAPS[i].name, BITMAPS[i].surface); if (result < 0) { - LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result); + if (result == -2) { + LOGI("Bitmap %s missing header\n", BITMAPS[i].name); + } else { + LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result); + } *BITMAPS[i].surface = NULL; } } |