multiboot1: Support TEXTMODE config as with Linux/mb2 protocols

This commit is contained in:
mintsuki 2023-04-13 19:21:49 +02:00
parent 93ae0e9afc
commit e57050d9c7

View File

@ -307,6 +307,16 @@ noreturn void multiboot1_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 (header.flags & (1 << 2)) {
req_width = header.fb_width;