From 4c923941eb9991b1ba21f83a72805b9295a5e4fd Mon Sep 17 00:00:00 2001 From: pointer-to-bios Date: Thu, 7 Mar 2024 03:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtty=E5=9C=A8=E6=9C=89?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=97=B6=E6=8D=A2=E8=A1=8C=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kernel/tty/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/tty/tty.c b/src/kernel/tty/tty.c index 2d63e9d..3530a47 100644 --- a/src/kernel/tty/tty.c +++ b/src/kernel/tty/tty.c @@ -58,8 +58,8 @@ void tty_set_framebuffer(tty *ttyx, framebuffer *fb) ttyx->height = ttyx->typeinfo.raw_framebuffer.height; if (ttyx->mode == tty_mode_text) { - ttyx->text.width = fb->width / tty_get_font()->char_width; - ttyx->text.height = fb->height / tty_get_font()->char_height; + ttyx->text.width = fb->width / (TTY_FONT_SCALE * tty_get_font()->char_width); + ttyx->text.height = fb->height / (TTY_FONT_SCALE * tty_get_font()->char_height); ttyx->text.line = 0; ttyx->text.column = 0; }