mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 15:26:47 +00:00
🐛 修复了printk在输出\t时,背景颜色不正确的bug,以及屏幕滚动的bug
This commit is contained in:
parent
832442af6a
commit
f95fa63972
@ -114,7 +114,7 @@ void auto_newline()
|
|||||||
pos.y = pos.max_y;
|
pos.y = pos.max_y;
|
||||||
int lines_to_scroll = 2;
|
int lines_to_scroll = 2;
|
||||||
scroll(true, lines_to_scroll * pos.char_size_y, false);
|
scroll(true, lines_to_scroll * pos.char_size_y, false);
|
||||||
pos.y -= lines_to_scroll;
|
pos.y -= (lines_to_scroll-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ int printk_color(unsigned int FRcolor, unsigned int BKcolor, const char *fmt, ..
|
|||||||
|
|
||||||
while (space_to_print--)
|
while (space_to_print--)
|
||||||
{
|
{
|
||||||
putchar(pos.FB_address, pos.width, pos.x * pos.char_size_x, pos.y * pos.char_size_y, BLACK, BLACK, ' ');
|
putchar(pos.FB_address, pos.width, pos.x * pos.char_size_x, pos.y * pos.char_size_y, FRcolor, BKcolor, ' ');
|
||||||
++pos.x;
|
++pos.x;
|
||||||
|
|
||||||
auto_newline();
|
auto_newline();
|
||||||
@ -723,6 +723,9 @@ int do_scroll(bool direction, int pixels)
|
|||||||
|
|
||||||
memcpy(pos.FB_address, (pos.FB_address + src), sizeof(unsigned int) * (pos.FB_length - src));
|
memcpy(pos.FB_address, (pos.FB_address + src), sizeof(unsigned int) * (pos.FB_length - src));
|
||||||
memset(pos.FB_address + (pos.FB_length - src), 0, sizeof(unsigned int) * (src));
|
memset(pos.FB_address + (pos.FB_length - src), 0, sizeof(unsigned int) * (src));
|
||||||
|
for (int i = 0; i < 1000; ++i)
|
||||||
|
for (int j = 0; j < 1000; ++j)
|
||||||
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user