menu: Do not have countdown if default entry is a directory
diff --git a/limine-pxe.bin b/limine-pxe.bin
index b4a6583a..d7f913e8 100644
Binary files a/limine-pxe.bin and b/limine-pxe.bin differ
diff --git a/limine.bin b/limine.bin
index bd1ddebd..a1f48842 100644
Binary files a/limine.bin and b/limine.bin differ
diff --git a/stage2.map b/stage2.map
index 70a90db6..c72e4551 100644
Binary files a/stage2.map and b/stage2.map differ
diff --git a/stage2/menu.c b/stage2/menu.c
index 103a4b4d..2e945c4a 100644
--- a/stage2/menu.c
+++ b/stage2/menu.c
@@ -239,6 +239,7 @@ static int print_tree(int level, int base_index, int selected_entry,
}
char *menu(char **cmdline) {
+ bool skip_timeout = false;
struct menu_entry *selected_menu_entry;
int selected_entry = 0;
@@ -319,7 +320,6 @@ char *menu(char **cmdline) {
}
disable_cursor();
- bool skip_timeout = false;
if (menu_tree == NULL)
panic("Config contains no entries.");
@@ -335,7 +335,10 @@ refresh:
int max_entries = print_tree(0, 0, selected_entry, menu_tree,
&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;
@@ -370,7 +373,6 @@ timeout_aborted:
case '\r':
autoboot:
if (selected_menu_entry->sub != NULL) {
- skip_timeout = true;
selected_menu_entry->expanded = !selected_menu_entry->expanded;
goto refresh;
}
diff --git a/test/limine.cfg b/test/limine.cfg
index 29dac8ee..d1bf4aab 100644
--- a/test/limine.cfg
+++ b/test/limine.cfg
@@ -1,4 +1,4 @@
-DEFAULT_ENTRY=0
+DEFAULT_ENTRY=1
TIMEOUT=3
GRAPHICS=yes
MENU_RESOLUTION=1024x768
