aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2015-03-23 15:45:31 -0500
committerElliott Hughes2015-03-23 15:45:31 -0500
commitfc06f87ecc71cb79887b1365dca8ac5555fe1205 (patch)
tree2daa1382c3ddf87eca055ded0ab8767bfe5330cb /screen_ui.cpp
parente944944fa58f66dad5483b6ee1ea9a2c0f9bedd2 (diff)
downloadplatform-bootable-recovery-fc06f87ecc71cb79887b1365dca8ac5555fe1205.tar.gz
platform-bootable-recovery-fc06f87ecc71cb79887b1365dca8ac5555fe1205.tar.xz
platform-bootable-recovery-fc06f87ecc71cb79887b1365dca8ac5555fe1205.zip
Make the recovery menus wrap.
The real problem is that the recovery UI is sluggish. But being able to wrap off the top to the bottom halves the maximum distance you'll have to go. Change-Id: Ifebe5b818f9c9a1c4187d4ac609422da1f38537f
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 03ef049a..5e3a24fd 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -526,8 +526,11 @@ int ScreenRecoveryUI::SelectMenu(int sel) {
526 if (show_menu > 0) { 526 if (show_menu > 0) {
527 old_sel = menu_sel; 527 old_sel = menu_sel;
528 menu_sel = sel; 528 menu_sel = sel;
529 if (menu_sel < 0) menu_sel = 0; 529
530 if (menu_sel >= menu_items) menu_sel = menu_items-1; 530 // Wrap at top and bottom.
531 if (menu_sel < 0) menu_sel = menu_items - 1;
532 if (menu_sel >= menu_items) menu_sel = 0;
533
531 sel = menu_sel; 534 sel = menu_sel;
532 if (menu_sel != old_sel) update_screen_locked(); 535 if (menu_sel != old_sel) update_screen_locked();
533 } 536 }