Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16d358b8 authored by Danny Baumann's avatar Danny Baumann
Browse files

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
parent 368bd2ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {