menu: Support using 1-9 to boot menu entries
This commit is contained in:
parent
7d70e31258
commit
aae5e6f779
26
.gitignore
vendored
26
.gitignore
vendored
@ -3,19 +3,19 @@
|
||||
/toolchain
|
||||
/reduced-gnu-efi
|
||||
/ovmf*
|
||||
/*.o
|
||||
/*.d
|
||||
/*.a
|
||||
/*.exe
|
||||
/*.EFI
|
||||
/*.bin
|
||||
/*.bin.gz
|
||||
/*.tar.xz
|
||||
/*.tar.gz
|
||||
/*.elf
|
||||
/*.hdd
|
||||
/*.iso
|
||||
/*.sys
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
*.exe
|
||||
*.EFI
|
||||
*.bin
|
||||
*.bin.gz
|
||||
*.tar.xz
|
||||
*.tar.gz
|
||||
*.elf
|
||||
*.hdd
|
||||
*.iso
|
||||
*.sys
|
||||
/bochsout.txt
|
||||
/bx_enh_dbg.ini
|
||||
/.vscode
|
||||
|
@ -821,6 +821,17 @@ refresh:
|
||||
c = getchar();
|
||||
timeout_aborted:
|
||||
switch (c) {
|
||||
case '1': case '2': case '3': case '4': case '5':
|
||||
case '6': case '7': case '8': case '9': {
|
||||
int ent = (c - '0') - 1;
|
||||
if (ent < (int)max_entries) {
|
||||
selected_entry = ent;
|
||||
print_tree(NULL, 0, 0, selected_entry, menu_tree,
|
||||
&selected_menu_entry);
|
||||
goto autoboot;
|
||||
}
|
||||
goto refresh;
|
||||
}
|
||||
case GETCHAR_CURSOR_UP:
|
||||
if (selected_entry == 0)
|
||||
selected_entry = max_entries - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user