diff options
author | Elliott Hughes <enh@google.com> | 2015-03-24 00:32:41 +0100 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-24 00:32:41 +0100 |
commit | cd3d35920526098fa3ba5d88c27ad5358c96909c (patch) | |
tree | f920282e789bbc0aeda4171df266ab14e347ff6d | |
parent | am 31e47876: Merge "Always use strerror to report errno in recovery." (diff) | |
parent | Merge "Make the recovery menus wrap." (diff) | |
download | android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar.gz android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar.bz2 android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar.lz android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar.xz android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.tar.zst android_bootable_recovery-cd3d35920526098fa3ba5d88c27ad5358c96909c.zip |
-rw-r--r-- | screen_ui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp index 03ef049ae..5e3a24fd2 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(); } |