mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OCB: Add ommitted 'tab back to picker' VO prompts to builtin picker
This commit is contained in:
parent
f31088216a
commit
d3be085e0f
@ -220,6 +220,7 @@ VOID
|
||||
UpdateTabContext (
|
||||
IN BOOLEAN IsEntering,
|
||||
IN OC_BOOT_CONTEXT *BootContext,
|
||||
IN OC_BOOT_ENTRY **BootEntries,
|
||||
IN TAB_CONTEXT TabContext,
|
||||
IN INTN ChosenEntry,
|
||||
IN CHAR16 OldEntryCursor,
|
||||
@ -243,6 +244,17 @@ UpdateTabContext (
|
||||
Code[0] = IsEntering ? OldEntryCursor : L' ';
|
||||
gST->ConOut->OutputString (gST->ConOut, Code);
|
||||
}
|
||||
|
||||
if (IsEntering) {
|
||||
if (ChosenEntry >= 0) {
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE);
|
||||
OcPlayAudioEntry (BootContext->PickerContext, BootEntries[ChosenEntry]);
|
||||
} else {
|
||||
//
|
||||
// TODO: Sound for tabbing back to picker if no entry selected (cannot currently happen)
|
||||
//
|
||||
}
|
||||
}
|
||||
} else if (TabContext == TAB_SHUTDOWN || TabContext == TAB_RESTART) {
|
||||
if (TabContext == TAB_SHUTDOWN) {
|
||||
gST->ConOut->SetCursorPosition (gST->ConOut, ShutdownColumn, ShutdownRestartRow);
|
||||
@ -252,23 +264,23 @@ UpdateTabContext (
|
||||
|
||||
Code[0] = IsEntering ? L'[' : '|';
|
||||
gST->ConOut->OutputString (gST->ConOut, Code);
|
||||
|
||||
if (TabContext == TAB_SHUTDOWN) {
|
||||
if (IsEntering) {
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE);
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileShutDown, FALSE);
|
||||
}
|
||||
gST->ConOut->OutputString (gST->ConOut, L"Shutdown");
|
||||
} else {
|
||||
if (IsEntering) {
|
||||
gST->ConOut->OutputString (gST->ConOut, L"Restart");
|
||||
}
|
||||
Code[0] = IsEntering ? L']' : '|';
|
||||
gST->ConOut->OutputString (gST->ConOut, Code);
|
||||
|
||||
if (IsEntering) {
|
||||
if (TabContext == TAB_SHUTDOWN) {
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE);
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileShutDown, FALSE);
|
||||
} else {
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE);
|
||||
OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileRestart, FALSE);
|
||||
}
|
||||
gST->ConOut->OutputString (gST->ConOut, L"Restart");
|
||||
}
|
||||
|
||||
Code[0] = IsEntering ? L']' : '|';
|
||||
gST->ConOut->OutputString (gST->ConOut, Code);
|
||||
}
|
||||
#if defined(BUILTIN_DEMONSTRATE_TYPING)
|
||||
else if (TabContext == TAB_TYPING_DEMO) {
|
||||
@ -549,6 +561,7 @@ OcShowSimpleBootMenu (
|
||||
UpdateTabContext (
|
||||
FALSE,
|
||||
BootContext,
|
||||
BootEntries,
|
||||
TabContext,
|
||||
ChosenEntry,
|
||||
OldEntryCursor,
|
||||
@ -585,6 +598,7 @@ OcShowSimpleBootMenu (
|
||||
UpdateTabContext (
|
||||
TRUE,
|
||||
BootContext,
|
||||
BootEntries,
|
||||
TabContext,
|
||||
ChosenEntry,
|
||||
OldEntryCursor,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user