fix: terminal now works correctly with a bg color (brat)
This commit is contained in:
@ -128,7 +128,7 @@ static struct font get_font_node(int c)
|
|||||||
static void terminal_scroll(void)
|
static void terminal_scroll(void)
|
||||||
{
|
{
|
||||||
screen->row--;
|
screen->row--;
|
||||||
memset(display.buff, 0, display.height * display.pitch);
|
terminal_clear();
|
||||||
for (size_t i = 0; i < VGA_WIDTH * (VGA_HEIGHT - 1); i++) {
|
for (size_t i = 0; i < VGA_WIDTH * (VGA_HEIGHT - 1); i++) {
|
||||||
const uint32_t x = (i % VGA_WIDTH) * FONT_WIDTH;
|
const uint32_t x = (i % VGA_WIDTH) * FONT_WIDTH;
|
||||||
const uint32_t y = (i / VGA_WIDTH) * FONT_HEIGHT;
|
const uint32_t y = (i / VGA_WIDTH) * FONT_HEIGHT;
|
||||||
@ -247,7 +247,7 @@ void set_color_level(int level)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
terminal_set_color(screen->default_color, 0);
|
terminal_set_color(screen->default_color, screen->bg_color);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
terminal_set_fg_color(color_translation[level]);
|
terminal_set_fg_color(color_translation[level]);
|
||||||
|
|||||||
Reference in New Issue
Block a user