summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-03-24 23:54:37 +0100
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-24 23:54:37 +0100
commit9460bb2c3df9e985c14d2dd76b03aefb3333b251 (patch)
tree954ddbce66798d137c74bc773b56775900c43b11 /screen_ui.cpp
parentMerge "Fix wipe command when using sideload in recovery" (diff)
parentFix recovery image text rendering. (diff)
downloadandroid_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar.gz
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar.bz2
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar.lz
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar.xz
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.tar.zst
android_bootable_recovery-9460bb2c3df9e985c14d2dd76b03aefb3333b251.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 5e3a24fd2..edc41abc0 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -246,12 +246,11 @@ void ScreenRecoveryUI::draw_screen_locked()
// display from the bottom up, until we hit the top of the
// screen, the bottom of the menu, or we've displayed the
// entire text buffer.
- int ty;
int row = (text_top+text_rows-1) % text_rows;
for (int ty = gr_fb_height() - char_height, count = 0;
ty > y+2 && count < text_rows;
ty -= char_height, ++count) {
- gr_text(4, ty, text[row], 0);
+ gr_text(0, ty, text[row], 0);
--row;
if (row < 0) row = text_rows-1;
}
@@ -480,8 +479,7 @@ void ScreenRecoveryUI::Print(const char *fmt, ...)
// This can get called before ui_init(), so be careful.
pthread_mutex_lock(&updateMutex);
if (text_rows > 0 && text_cols > 0) {
- char *ptr;
- for (ptr = buf; *ptr != '\0'; ++ptr) {
+ for (char* ptr = buf; *ptr != '\0'; ++ptr) {
if (*ptr == '\n' || text_col >= text_cols) {
text[text_row][text_col] = '\0';
text_col = 0;
@@ -521,10 +519,9 @@ void ScreenRecoveryUI::StartMenu(const char* const * headers, const char* const
}
int ScreenRecoveryUI::SelectMenu(int sel) {
- int old_sel;
pthread_mutex_lock(&updateMutex);
if (show_menu > 0) {
- old_sel = menu_sel;
+ int old_sel = menu_sel;
menu_sel = sel;
// Wrap at top and bottom.
@@ -539,7 +536,6 @@ int ScreenRecoveryUI::SelectMenu(int sel) {
}
void ScreenRecoveryUI::EndMenu() {
- int i;
pthread_mutex_lock(&updateMutex);
if (show_menu > 0 && text_rows > 0 && text_cols > 0) {
show_menu = 0;