From 0c98f578ad61c7bda4b42b625be3e2c827b068bb Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Thu, 12 Sep 2024 16:41:26 +0200 Subject: [PATCH] fix(core): support 32 bit colors in terminal [no changelog] --- core/embed/lib/terminal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/embed/lib/terminal.c b/core/embed/lib/terminal.c index 0891fcbed..74ce9d7cb 100644 --- a/core/embed/lib/terminal.c +++ b/core/embed/lib/terminal.c @@ -81,8 +81,8 @@ static void term_redraw_rows(int start_row, int row_count) { .src_x = 0, .src_y = 0, .src_stride = 8, - .src_fg = terminal_fgcolor, - .src_bg = terminal_bgcolor, + .src_fg = gfx_color16_to_color(terminal_fgcolor), + .src_bg = gfx_color16_to_color(terminal_bgcolor), }; for (int y = start_row; y < start_row + row_count; y++) { @@ -159,9 +159,9 @@ void term_print(const char *text, int textlen) { } const uint8_t *g = Font_Bitmap + (5 * (c - ' ')); if (k < 5 && (g[k] & (1 << j))) { - PIXELDATA(terminal_fgcolor); + PIXELDATA(gfx_color16_to_color(terminal_fgcolor)); } else { - PIXELDATA(terminal_bgcolor); + PIXELDATA(gfx_color16_to_color(terminal_bgcolor)); } } display_pixeldata_dirty();