From 16d358b8fdaadf55c1d7d94575bb117278250f37 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Tue, 8 Nov 2016 10:37:52 +0100 Subject: Fix log text placement. Commit I4b56db78d13931fdd79580b801260bdfca0e9726 intended to constrain the log to the lower quarter of the screen, but miscalculated the respective limit value. Also make sure to display the log starting from the last line. Change-Id: I87fb2f311ff312faeca8777559d46c1569f6b95f --- screen_ui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/screen_ui.cpp b/screen_ui.cpp index 3c0bbaf..9ddf482 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -398,7 +398,7 @@ void ScreenRecoveryUI::draw_screen_locked() { if (show_text) { if (currentIcon == ERASING || currentIcon == INSTALLING_UPDATE || currentIcon == VIEWING_LOG) { - size_t y = currentIcon == INSTALLING_UPDATE ? gr_fb_height() / 4 : header_height_ + 4; + size_t y = currentIcon == INSTALLING_UPDATE ? 3 * gr_fb_height() / 4 : header_height_ + 4; SetColor(LOG); int cx, cy; @@ -407,7 +407,7 @@ void ScreenRecoveryUI::draw_screen_locked() { // display from the bottom up, until we hit the top of the // screen or we've displayed the entire text buffer. size_t ty, count; - int row = (text_first_row_ + log_text_rows_ - 1) % log_text_rows_; + int row = (text_row_ + log_text_rows_ - 1) % log_text_rows_; for (ty = gr_fb_height() - cy, count = 0; ty > y + 2 && count < log_text_rows_; ty -= (cy + 2), ++count) { -- cgit v1.1