Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure the menu shows when the callback fails

Since Pause() doesn't clear the key from the input queue, the next
ReadKeyStroke reads the queued key instead of the new one. If the
user presses "Enter", MokManager exits directly without showing
the menu again.
  • Loading branch information...
commit 4bab48ce880964b3ee709b5acd565160dbf9ff19 1 parent 990dcdb
Gary Ching-Pang Lin lcp authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  MokManager.c
3  MokManager.c
@@ -1241,6 +1241,9 @@ static void run_menu (CHAR16 *header, UINTN lines, struct menu_item *items,
if (ret < 0) {
Print(L"Press a key to continue\n");
+ /* Clear the key in the queue */
+ uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2,
+ ST->ConIn, &key);
draw_menu (header, lines, items, count);
pos = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.