mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-22 04:22:05 +03:00
menu: Do not have countdown if default entry is a directory
This commit is contained in:
parent
75c51c1e53
commit
fe022c49f5
BIN
limine-pxe.bin
BIN
limine-pxe.bin
Binary file not shown.
BIN
limine.bin
BIN
limine.bin
Binary file not shown.
BIN
stage2.map
BIN
stage2.map
Binary file not shown.
@ -239,6 +239,7 @@ static int print_tree(int level, int base_index, int selected_entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *menu(char **cmdline) {
|
char *menu(char **cmdline) {
|
||||||
|
bool skip_timeout = false;
|
||||||
struct menu_entry *selected_menu_entry;
|
struct menu_entry *selected_menu_entry;
|
||||||
|
|
||||||
int selected_entry = 0;
|
int selected_entry = 0;
|
||||||
@ -319,7 +320,6 @@ char *menu(char **cmdline) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_cursor();
|
disable_cursor();
|
||||||
bool skip_timeout = false;
|
|
||||||
|
|
||||||
if (menu_tree == NULL)
|
if (menu_tree == NULL)
|
||||||
panic("Config contains no entries.");
|
panic("Config contains no entries.");
|
||||||
@ -335,7 +335,10 @@ refresh:
|
|||||||
int max_entries = print_tree(0, 0, selected_entry, menu_tree,
|
int max_entries = print_tree(0, 0, selected_entry, menu_tree,
|
||||||
&selected_menu_entry);
|
&selected_menu_entry);
|
||||||
|
|
||||||
print("\nArrows to choose, enter to select, 'e' to edit selected entry.");
|
print("\nArrows to choose, enter to boot, 'e' to edit selected entry.");
|
||||||
|
|
||||||
|
if (selected_menu_entry->sub != NULL)
|
||||||
|
skip_timeout = true;
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
@ -370,7 +373,6 @@ timeout_aborted:
|
|||||||
case '\r':
|
case '\r':
|
||||||
autoboot:
|
autoboot:
|
||||||
if (selected_menu_entry->sub != NULL) {
|
if (selected_menu_entry->sub != NULL) {
|
||||||
skip_timeout = true;
|
|
||||||
selected_menu_entry->expanded = !selected_menu_entry->expanded;
|
selected_menu_entry->expanded = !selected_menu_entry->expanded;
|
||||||
goto refresh;
|
goto refresh;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
DEFAULT_ENTRY=0
|
DEFAULT_ENTRY=1
|
||||||
TIMEOUT=3
|
TIMEOUT=3
|
||||||
GRAPHICS=yes
|
GRAPHICS=yes
|
||||||
MENU_RESOLUTION=1024x768
|
MENU_RESOLUTION=1024x768
|
||||||
|
Loading…
Reference in New Issue
Block a user