aboutsummaryrefslogtreecommitdiffstats
path: root/default_recovery_ui.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2010-07-14 18:37:33 -0700
committerKoushik Dutta <koushd@gmail.com>2010-07-14 18:37:33 -0700
commit1bf4f695d4784f304d6cac5a1addec31c2f3fdb9 (patch)
treed988071decf425d34e1b953107c63c814fbe5461 /default_recovery_ui.c
parent37186b19bce9994907a276f057468dfc28a98b00 (diff)
downloadbootable_recovery-1bf4f695d4784f304d6cac5a1addec31c2f3fdb9.zip
bootable_recovery-1bf4f695d4784f304d6cac5a1addec31c2f3fdb9.tar.gz
bootable_recovery-1bf4f695d4784f304d6cac5a1addec31c2f3fdb9.tar.bz2
allow toggling of software back menu item. add recovery checkpoint file. mount auto now uses busybox mount.
Diffstat (limited to 'default_recovery_ui.c')
-rw-r--r--default_recovery_ui.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/default_recovery_ui.c b/default_recovery_ui.c
index f189da4..8ee1239 100644
--- a/default_recovery_ui.c
+++ b/default_recovery_ui.c
@@ -37,11 +37,10 @@ int device_toggle_display(volatile char* key_pressed, int key_code) {
if (alt && key_code == KEY_L)
return 1;
// allow toggling of the display if the correct key is pressed, and the display toggle is allowed or the display is currently off
-#ifdef KEY_POWER_IS_SELECT_ITEM
- return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END);
-#else
+ if (ui_get_showing_back_button()) {
+ return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END);
+ }
return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_POWER || key_code == KEY_END);
-#endif
}
int device_reboot_now(volatile char* key_pressed, int key_code) {
@@ -59,9 +58,13 @@ int device_handle_key(int key_code, int visible) {
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
-#ifdef KEY_POWER_IS_SELECT_ITEM
case KEY_POWER:
-#endif
+ if (ui_get_showing_back_button()) {
+ return SELECT_ITEM;
+ }
+ if (!get_allow_toggle_display())
+ return GO_BACK;
+ break;
case KEY_ENTER:
case BTN_MOUSE:
case KEY_CENTER:
@@ -70,9 +73,6 @@ int device_handle_key(int key_code, int visible) {
case KEY_SEND:
return SELECT_ITEM;
-#ifndef KEY_POWER_IS_SELECT_ITEM
- case KEY_POWER:
-#endif
case KEY_END:
case KEY_BACKSPACE:
case KEY_BACK: