修复屏幕滚动时底下有一条没有刷新的bug

This commit is contained in:
pointer-to-bios 2024-05-02 23:14:43 +08:00
parent ba36b60b68
commit 8e2d61de4a
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ inline static void scroll_buffer(
usize dist) usize dist)
{ {
memcpy(buffer, buffer + width * pixsize * dist, (height - dist) * width * pixsize); memcpy(buffer, buffer + width * pixsize * dist, (height - dist) * width * pixsize);
memset(buffer + (height - dist) * width * pixsize, 0, dist * width * pixsize);
} }
inline static void putchar( inline static void putchar(