nvramcui: don't wait for the first key update to render the form

Flush out the initial screen window and render the form before the first
keypress. It looks overly weird otherwise and is very likely unintended.

Change-Id: I8700e36e608f2ba115359070f75b7dc9f230291e
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-on: http://review.coreboot.org/8526
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Lubomir Rintel 2015-02-01 15:24:43 +01:00 committed by Patrick Georgi
parent a63da6f97e
commit 68009e98ab
1 changed files with 3 additions and 1 deletions

View File

@ -81,6 +81,7 @@ int main()
keypad(stdscr, TRUE); keypad(stdscr, TRUE);
cbreak(); cbreak();
noecho(); noecho();
start_color(); start_color();
leaveok(stdscr, TRUE); leaveok(stdscr, TRUE);
curs_set(1); curs_set(1);
@ -88,6 +89,7 @@ int main()
erase(); erase();
box(stdscr, 0, 0); box(stdscr, 0, 0);
mvaddstr(0, 2, "coreboot configuration utility"); mvaddstr(0, 2, "coreboot configuration utility");
refresh();
/* prep CMOS layout into libcurses data structures */ /* prep CMOS layout into libcurses data structures */
@ -188,6 +190,7 @@ int main()
done = 0; done = 0;
while(!done) { while(!done) {
render_form(form);
ch=getch(); ch=getch();
if (ch == ERR) continue; if (ch == ERR) continue;
switch (ch) { switch (ch) {
@ -225,7 +228,6 @@ int main()
form_driver(form, ch); form_driver(form, ch);
break; break;
} }
render_form(form);
} }
for (i = 0; i < numopts; i++) { for (i = 0; i < numopts; i++) {