From 07d7e06b2b04713f5a2bf81eb517c08657d40cd0 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sun, 5 May 2024 15:29:20 +0200 Subject: [PATCH] Flush keyboard buffer out of any keystrokes before waiting for user input --- xtldr/textui.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xtldr/textui.c b/xtldr/textui.c index 07e6793..107082b 100644 --- a/xtldr/textui.c +++ b/xtldr/textui.c @@ -106,6 +106,9 @@ BlDisplayBootMenu() Events[0] = EfiSystemTable->ConIn->WaitForKey; Events[1] = TimerEvent; + /* Flush keyboard buffer out of any keystrokes */ + EfiSystemTable->ConIn->Reset(EfiSystemTable->ConIn, FALSE); + /* Infinite boot menu event loop */ while(TRUE) {