From 8496c787326db4b8fe3842c257cabe4b5b5ae751 Mon Sep 17 00:00:00 2001 From: 0x35c <> Date: Mon, 3 Nov 2025 17:31:26 +0100 Subject: [PATCH] fix: terminal now works correctly with a bg color (brat) --- src/terminal/put.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/put.c b/src/terminal/put.c index 0b862ae..777d7e7 100644 --- a/src/terminal/put.c +++ b/src/terminal/put.c @@ -128,7 +128,7 @@ static struct font get_font_node(int c) static void terminal_scroll(void) { screen->row--; - memset(display.buff, 0, display.height * display.pitch); + terminal_clear(); for (size_t i = 0; i < VGA_WIDTH * (VGA_HEIGHT - 1); i++) { const uint32_t x = (i % VGA_WIDTH) * FONT_WIDTH; const uint32_t y = (i / VGA_WIDTH) * FONT_HEIGHT; @@ -247,7 +247,7 @@ void set_color_level(int level) }; if (level == 0) { - terminal_set_color(screen->default_color, 0); + terminal_set_color(screen->default_color, screen->bg_color); return; } terminal_set_fg_color(color_translation[level]);