:: commit aae6aa1cea69905fee952e7c52d39f1d856e78af

K. Lange <klange@toaruos.org> — 2023-04-12 10:50

parents: 77591d21b1

multiboot2: Support TEXTMODE config as with linux

diff --git a/common/protos/multiboot2.c b/common/protos/multiboot2.c
index f320028a..fe15059f 100644
--- a/common/protos/multiboot2.c
+++ b/common/protos/multiboot2.c
@@ -521,6 +521,15 @@ noreturn void multiboot2_load(char *config, char* cmdline) {
         size_t req_width = 0;
         size_t req_height = 0;
         size_t req_bpp = 0;
+#if defined (BIOS)
+        {
+            char *textmode_str = config_get_value(config, 0, "TEXTMODE");
+            bool textmode = textmode_str != NULL && strcmp(textmode_str, "yes") == 0;
+            if (textmode) {
+                goto textmode;
+            }
+        }
+#endif
 
         if (fbtag) {
             req_width = fbtag->width;
tab: 248 wrap: offon