mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
Merge 82c9a82d8f into fb2ac429de
This commit is contained in:
commit
affc726a7b
1 changed files with 10 additions and 19 deletions
|
|
@ -277,28 +277,21 @@ BdsWaitForSingleEvent (
|
|||
}
|
||||
|
||||
/**
|
||||
The function reads user inputs.
|
||||
Drain queued console input.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
BdsReadKeys (
|
||||
BdsDrainConsoleInput (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_INPUT_KEY Key;
|
||||
|
||||
if (PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
return;
|
||||
}
|
||||
EFI_STATUS Status;
|
||||
|
||||
while (gST->ConIn != NULL) {
|
||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// No more keys.
|
||||
//
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -326,9 +319,6 @@ BdsWait (
|
|||
DEBUG ((DEBUG_INFO, "[Bds]BdsWait(%d)..Zzzz...\n", (UINTN)TimeoutRemain));
|
||||
PlatformBootManagerWaitCallback (TimeoutRemain);
|
||||
|
||||
BdsReadKeys (); // BUGBUG: Only reading can signal HotkeyTriggered
|
||||
// Can be removed after all keyboard drivers invoke callback in timer callback.
|
||||
|
||||
if (HotkeyTriggered != NULL) {
|
||||
Status = BdsWaitForSingleEvent (HotkeyTriggered, EFI_TIMER_PERIOD_SECONDS (1));
|
||||
if (!EFI_ERROR (Status)) {
|
||||
|
|
@ -1041,6 +1031,12 @@ BdsEntry (
|
|||
BdsDxeOnConnectConInCallBack (NULL, NULL);
|
||||
}
|
||||
|
||||
//
|
||||
// A hotkey notification can leave the same key queued for ReadKeyStroke().
|
||||
// Consume it before Enter can immediately select Continue in Front Page.
|
||||
//
|
||||
BdsDrainConsoleInput ();
|
||||
|
||||
//
|
||||
// Directly enter the setup page.
|
||||
//
|
||||
|
|
@ -1063,11 +1059,6 @@ BdsEntry (
|
|||
PERF_INMODULE_BEGIN ("BdsWait");
|
||||
BdsWait (HotkeyTriggered);
|
||||
PERF_INMODULE_END ("BdsWait");
|
||||
//
|
||||
// BdsReadKeys() can be removed after all keyboard drivers invoke callback in timer callback.
|
||||
//
|
||||
BdsReadKeys ();
|
||||
|
||||
EfiBootManagerHotkeyBoot ();
|
||||
|
||||
if (BootNext != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue