From fc06f87ecc71cb79887b1365dca8ac5555fe1205 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 23 Mar 2015 13:45:31 -0700 Subject: 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 --- screen_ui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'screen_ui.cpp') diff --git a/screen_ui.cpp b/screen_ui.cpp index 03ef049..5e3a24f 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -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(); } -- cgit v1.1