X-Git-Url: https://code.delx.au/refind/blobdiff_plain/4cd24d129d16bd6c49d19c84757f769f09a53236..2eb4a9ca3c35a44bb35b7a0998ff036797a8580e:/refind/menu.c diff --git a/refind/menu.c b/refind/menu.c index 4a7f1c9..8b86c35 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -251,8 +251,7 @@ static INTN FindMenuShortcutEntry(IN REFIT_MENU_SCREEN *Screen, IN CHAR16 *Short Shortcut[0] -= ('a' - 'A'); if (Shortcut[0]) { for (i = 0; i < Screen->EntryCount; i++) { - if (Screen->Entries[i]->ShortcutDigit == Shortcut[0] || - Screen->Entries[i]->ShortcutLetter == Shortcut[0]) { + if (Screen->Entries[i]->ShortcutDigit == Shortcut[0] || Screen->Entries[i]->ShortcutLetter == Shortcut[0]) { return i; } // if } // for @@ -807,10 +806,10 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT UINTN RunMenu(IN REFIT_MENU_SCREEN *Screen, OUT REFIT_MENU_ENTRY **ChosenEntry) { MENU_STYLE_FUNC Style = TextMenuStyle; - + if (AllowGraphicsMode) Style = GraphicsMenuStyle; - + return RunGenericMenu(Screen, Style, -1, ChosenEntry); } @@ -823,8 +822,7 @@ UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT UINTN DefaultEntryIndex = -1; if (DefaultSelection != NULL) { - // Find a menu entry whose shortcut is the first character of DefaultSelection, or - // whose + // Find a menu entry that includes *DefaultSelection as a substring DefaultEntryIndex = FindMenuShortcutEntry(Screen, DefaultSelection); // If that didn't work, should we scan more characters? For now, no. }