:: commit 6c0ba4104fdf78eca3ee2cc0b6fddb307a2f8913

mintsuki <mintsuki@protonmail.com> — 2020-09-19 13:43

parents: d3bd628243

Default to graphical mode for the menu

diff --git a/limine.bin b/limine.bin
index 8f0c09de..24888aea 100644
Binary files a/limine.bin and b/limine.bin differ
diff --git a/stage2/menu.c b/stage2/menu.c
index 09b12129..7eaec97b 100644
--- a/stage2/menu.c
+++ b/stage2/menu.c
@@ -19,10 +19,9 @@ char *menu(void) {
 
     char buf[16];
 
-    if (config_get_value(buf, 0, 16, "GRAPHICS")) {
-        if (!strcmp(buf, "on")) {
-            term_vbe();
-        }
+    // If there is no TEXTMODE config key or the value is not "on", enable graphics
+    if (config_get_value(buf, 0, 16, "TEXTMODE") == NULL || strcmp(buf, "on")) {
+        term_vbe();
     }
 
     int timeout;
@@ -91,7 +90,6 @@ refresh:
                     }
                 }
                 clear(true);
-                term_textmode();
                 return cmdline;
             case 'e':
                 config_set_entry(selected_entry);
@@ -104,7 +102,6 @@ refresh:
                 print("\n\n> ");
                 gets(cmdline, cmdline, CMDLINE_MAX);
                 clear(true);
-                term_textmode();
                 return cmdline;
         }
     }
tab: 248 wrap: offon