am 733deb26: Merge "Make the recovery menus wrap."

* commit '733deb267db3488be408cbe020769108ee6584b0':
  Make the recovery menus wrap.
This commit is contained in:
Elliott Hughes
2015-03-23 23:32:41 +00:00
committed by Android Git Automerger
+5 -2
View File
@@ -526,8 +526,11 @@ int ScreenRecoveryUI::SelectMenu(int sel) {
if (show_menu > 0) {
old_sel = menu_sel;
menu_sel = sel;
if (menu_sel < 0) menu_sel = 0;
if (menu_sel >= menu_items) menu_sel = menu_items-1;
// Wrap at top and bottom.
if (menu_sel < 0) menu_sel = menu_items - 1;
if (menu_sel >= menu_items) menu_sel = 0;
sel = menu_sel;
if (menu_sel != old_sel) update_screen_locked();
}