kexts: fbcon: support scrolling multiple lines under vgacon
This commit is contained in:
@@ -167,10 +167,19 @@ static void vgacon_move_cursor(struct device *dev, int x, int y)
|
||||
|
||||
static void vgacon_scroll(struct device *dev, enum tty_scroll_dir dir, int lines)
|
||||
{
|
||||
uint16_t *src = g_console_fb + (k_console_width * lines);
|
||||
uint16_t *dst = g_console_fb;
|
||||
size_t n = k_console_width * (k_console_height - lines) * 2;
|
||||
|
||||
memmove(dst, src, n);
|
||||
|
||||
dst = g_console_fb + ((k_console_height - lines) * k_console_width);
|
||||
|
||||
for (int i = 0; i < k_console_width * lines; i++) {
|
||||
dst[i] = VGA_CHAR(0, DEFAULT_ATTRIB);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static struct tty_driver_ops vgacon_ops = {
|
||||
.tty_init = vgacon_init,
|
||||
.tty_deinit = vgacon_deinit,
|
||||
|
||||
Reference in New Issue
Block a user