From d69f748fcdb91f2c34b42b5e933b92288a8081fd Mon Sep 17 00:00:00 2001 From: Regina König Date: Fri, 30 Jul 2021 21:00:02 +0200 Subject: Move display to the right --- efi_memtest/memtest86+/efi/display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/efi_memtest/memtest86+/efi/display.c b/efi_memtest/memtest86+/efi/display.c index 7ae3c2a..15d4f8d 100644 --- a/efi_memtest/memtest86+/efi/display.c +++ b/efi_memtest/memtest86+/efi/display.c @@ -11,6 +11,8 @@ extern EFI_SYSTEM_TABLE *gST; extern struct barrier_s *barr; #define CONSOLE_WIDTH 80 +#define X_OFFSET 10 +#define Y_OFFSET 0 CHAR16 scroll_buffer[10][79]; int scroll_begin = 0; @@ -281,7 +283,7 @@ void cprint(int y, int x, const char *text) //output_text[i-1] = '\n'; output_text[i] = '\0'; - Console->SetCursorPosition(Console, x, y); + Console->SetCursorPosition(Console, x + X_OFFSET, y + Y_OFFSET); Console->OutputString(Console, output_text); if (y <= 23 && y>= 14) { @@ -358,7 +360,7 @@ void print_scroll_region() { scroll_begin %= 10; for (int i = 0; i < 9; ++i) { - Console->SetCursorPosition(Console, 0, LINE_SCROLL + i); + Console->SetCursorPosition(Console, 0 + X_OFFSET, LINE_SCROLL + i + Y_OFFSET); Console->OutputString(Console, scroll_buffer[(scroll_begin + i) % 10]); } } \ No newline at end of file -- cgit v1.2.3-55-g7522