mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-07-23 19:32:56 +00:00
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.
This commit is contained in:
parent
92a136d823
commit
4a88de5816
@ -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");
|
||||
Pause();
|
||||
/* Clear the key in the queue */
|
||||
uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2,
|
||||
ST->ConIn, &key);
|
||||
}
|
||||
draw_menu (header, lines, items, count);
|
||||
pos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user