diff options
author | Koushik Dutta <koushd@gmail.com> | 2010-07-14 18:37:33 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2010-07-19 08:40:58 -0700 |
commit | 4ca9b4c3a07865fc1c802937853b43a395a279e7 (patch) | |
tree | 1d9a28c52a510afbe0ba447e48614a9961a01d3d /default_recovery_ui.c | |
parent | efa6530dbd10d601d229a3cb135be6932db33684 (diff) | |
download | bootable_recovery-4ca9b4c3a07865fc1c802937853b43a395a279e7.zip bootable_recovery-4ca9b4c3a07865fc1c802937853b43a395a279e7.tar.gz bootable_recovery-4ca9b4c3a07865fc1c802937853b43a395a279e7.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.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/default_recovery_ui.c b/default_recovery_ui.c index 8e98a67..2711f14 100644 --- a/default_recovery_ui.c +++ b/default_recovery_ui.c @@ -41,11 +41,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) { @@ -63,9 +62,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: @@ -74,9 +77,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: |