修复tty在有缩放时换行错误的问题

This commit is contained in:
pointer-to-bios 2024-03-07 03:22:26 +08:00
parent ba6e23ee99
commit 4c923941eb
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}