From a7a35dde7325d9c3c42f45e4c56c2235a2abf19c Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 24 Oct 2021 18:26:49 +0000 Subject: tbi/screen: add attributes to support color --- lib/tbi/screen.c | 1 + lib/tbi/screen.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/tbi/screen.c b/lib/tbi/screen.c index 7eb9ac2..ae4f2be 100644 --- a/lib/tbi/screen.c +++ b/lib/tbi/screen.c @@ -23,6 +23,7 @@ struct screen *prepare_screen(VOID) &(scr->columns), &(scr->lines) ); + scr->attr = gST->ConOut->Mode->Attribute; return scr; } diff --git a/lib/tbi/screen.h b/lib/tbi/screen.h index ae25640..cff98a8 100644 --- a/lib/tbi/screen.h +++ b/lib/tbi/screen.h @@ -9,6 +9,7 @@ struct screen EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *stdout; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *stderr; UINTN columns, lines; // current screen size + INT32 attr; // main screen attributes }; /* -- cgit v1.2.3-18-g5258