loader: vidc_init should also erase the screen

Inject \e[J to erase the initial loader screen. We have two options,
find where out cursor is and use BIOS scroll for data from boot2 or erase the
display and start from origin. Erasing the screen is easier and we also
get the screen buffer initialized.

Sponsored by:	Netflix, Klara Inc.
This commit is contained in:
Toomas Soome 2020-06-17 08:08:57 +00:00
parent 2726a70148
commit aeea57c709

View File

@ -709,11 +709,8 @@ vidc_init(int arg)
env_setenv("teken.bg_color", EV_VOLATILE, env, vidc_set_colors,
env_nounset);
for (int row = 0; row < tp.tp_row; row++)
for (int col = 0; col < tp.tp_col; col++) {
buffer[col + row * tp.tp_col].c = ' ';
buffer[col + row * tp.tp_col].a = *a;
}
/* Erase display, this will also fill our screen buffer. */
teken_input(&teken, "\e[J", 3);
for (int i = 0; i < 10 && vidc_ischar(); i++)
(void) vidc_getchar();