From 7d576d3cd559373c85c65dc29a4ff0628f5e1a0c Mon Sep 17 00:00:00 2001 From: Jarkko Toivanen Date: Wed, 14 Jun 2023 05:21:38 +0300 Subject: [PATCH] Fixing vga_write_line_color newline colour --- vga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vga.c b/vga.c index 187f56f..9589d4f 100644 --- a/vga.c +++ b/vga.c @@ -8,6 +8,7 @@ unsigned int cursor_loc = CURSOR_HOME; unsigned char fgcolor; unsigned char bgcolor; +unsigned short blank; static unsigned char vga_entry_color(enum vga_color fg, enum vga_color bg) { return fg | bg << 4; @@ -26,17 +27,16 @@ void vga_set_color(enum vga_color fg, enum vga_color bg) { } void vga_init(enum vga_color fg, enum vga_color bg) { vga_set_color(fg, bg); + blank = vga_blank_entry(); cls(); } void cls(void) { - unsigned short blank = vga_blank_entry(); int i; for (i=0; i