mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcBootManagementLib: Fix default boot entry selection without timeout (#222)
This commit is contained in:
parent
a9d5ed572b
commit
1db11dc689
@ -125,11 +125,11 @@ OcShowSimpleBootMenu (
|
||||
BOOLEAN PlayedOnce;
|
||||
BOOLEAN PlayChosen;
|
||||
|
||||
ChosenEntry = -1;
|
||||
Code[1] = '\0';
|
||||
|
||||
TimeOutSeconds = BootContext->PickerContext->TimeoutSeconds;
|
||||
ASSERT (BootContext->DefaultEntry != NULL);
|
||||
ChosenEntry = (INTN) (BootContext->DefaultEntry->EntryIndex - 1);
|
||||
|
||||
PlayedOnce = FALSE;
|
||||
PlayChosen = FALSE;
|
||||
@ -258,9 +258,6 @@ OcShowSimpleBootMenu (
|
||||
BootContext->PickerContext->HideAuxiliary = FALSE;
|
||||
return EFI_ABORTED;
|
||||
} else if (KeyIndex == OC_INPUT_UP) {
|
||||
if (TimeOutSeconds > 0) {
|
||||
ChosenEntry = (INTN) (BootContext->DefaultEntry->EntryIndex - 1);
|
||||
}
|
||||
if (ChosenEntry < 0) {
|
||||
ChosenEntry = 0;
|
||||
} else if (ChosenEntry == 0) {
|
||||
@ -274,9 +271,6 @@ OcShowSimpleBootMenu (
|
||||
}
|
||||
break;
|
||||
} else if (KeyIndex == OC_INPUT_DOWN) {
|
||||
if (TimeOutSeconds > 0) {
|
||||
ChosenEntry = (INTN) (BootContext->DefaultEntry->EntryIndex - 1);
|
||||
}
|
||||
if (ChosenEntry < 0) {
|
||||
ChosenEntry = 0;
|
||||
} else if (ChosenEntry == (INTN) (MIN (Count, OC_INPUT_MAX) - 1)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user