clean: simplify code && maybe fix
This commit is contained in:
parent
4a99b82e15
commit
6bdba0cb4f
@ -86,7 +86,7 @@ static char *get_line(void)
|
||||
struct key_event ev;
|
||||
const size_t size = sizeof(screen->line);
|
||||
|
||||
while (1) {
|
||||
do {
|
||||
ev = get_key();
|
||||
if (!ev.scan_code)
|
||||
continue;
|
||||
@ -105,9 +105,7 @@ static char *get_line(void)
|
||||
kprintf("%c", ev.c);
|
||||
buf[i++] = ev.c;
|
||||
}
|
||||
if (i >= size)
|
||||
break;
|
||||
}
|
||||
} while (i < size);
|
||||
kprintf("\n");
|
||||
screen->line[i] = '\0';
|
||||
return screen->line;
|
||||
|
@ -30,6 +30,7 @@ void terminal_initialize(void)
|
||||
screens[i].fg_color = screens[i].default_color;
|
||||
screens[i].backgound = &image_icon;
|
||||
screens[i].font = eating_pasta_regular_13_font;
|
||||
memset(screens[i].line, 0, sizeof(screen->line));
|
||||
}
|
||||
// draw_icon(0, 0, screen->backgound);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user