From bbe7014e2926c6bfdfae20f12048bfe4e951c0e1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 28 Oct 2019 13:01:31 +0100 Subject: Fixed one inversion --- src/kernel/graphics/vesa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/graphics/vesa.c') diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 379109d..a74050f 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -257,12 +257,12 @@ void vesa_clear() { void vesa_draw_char(char ch) { if (ch >= ' ') { - int pos = (terminal_x - 8) * vbe_bpl + (terminal_y - 16) * vbe_pitch; + int pos = terminal_x * vbe_bpl + terminal_y * vbe_pitch; int mask[8] = {1, 2, 4, 8, 16, 32, 64, 128}; unsigned char *glyph = font[ch - 32]; char *draw = (char *) &fb[pos]; - for (int cy = 0; cy < 13; cy++) { + for (int cy = 12; cy >= 0; cy--) { for (int cx = 0; cx < 8; cx++) { if (glyph[cy] & mask[cx]) { draw[vbe_bpl * cx] = terminal_color[2]; -- cgit v1.2.3