Skip to content
Browse files

kboot: Remove possibly cached UART input before displaying userprompt

kboot: Reinit console after changing xenos-videomode (resolution)
  • Loading branch information...
1 parent fb8b864 commit 6fe164bd998f34f73d0874cd33fe80da74a8d8a8 tuxuser committed Mar 4, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 source/lv2/kboot/kbootconf.c
View
5 source/lv2/kboot/kbootconf.c
@@ -116,6 +116,7 @@ void kboot_set_config(void)
if(conf.videomode > VIDEO_MODE_AUTO && conf.videomode <= VIDEO_MODE_NTSC && oldvideomode != conf.videomode){
oldvideomode = conf.videomode;
xenos_init(conf.videomode);
+ console_init();
printf(" * Xenos re-initalized\n");
}
@@ -350,6 +351,10 @@ int user_prompt(int defaultchoice, int max, int timeout) {
if (defaultchoice < 0) defaultchoice = 0;
+ /* Remove possibly cached input on UART */
+ while (kbhit())
+ getch();
+
while (delta <= timeout || timeout_disabled) {
/* measure seconds since menu start */

0 comments on commit 6fe164b

Please sign in to comment.
Something went wrong with that request. Please try again.