summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-11-08 10:37:52 +0100
committerDanny Baumann <dannybaumann@web.de>2016-11-08 10:37:52 +0100
commit16d358b8fdaadf55c1d7d94575bb117278250f37 (patch)
tree3367cf8bc64f384c15d44f5128b3cb3c3cbda683
parent368bd2abab25c637a657d1fe4cef6b2222b29e82 (diff)
downloadbootable_recovery-16d358b8fdaadf55c1d7d94575bb117278250f37.zip
bootable_recovery-16d358b8fdaadf55c1d7d94575bb117278250f37.tar.gz
bootable_recovery-16d358b8fdaadf55c1d7d94575bb117278250f37.tar.bz2
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
-rw-r--r--screen_ui.cpp4
1 files 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) {