Overwrite BGRT in a more readable manner

This commit is contained in:
Lauri Kenttä
2023-10-04 15:25:03 +03:00
parent 00bbfd6d82
commit 62c892009a
+13 -6
View File
@@ -325,12 +325,19 @@ void HackBgrt(EFI_FILE_HANDLE root_dir) {
} }
} }
// Clear the BGRT. *bgrt = (ACPI_BGRT) {
const char data[0x38] = .header = {
"BGRT" "\x38\x00\x00\x00" "\x00" "\xd6" "Mtblx*" "HackBGRT" .signature = "BGRT",
"\x20\x17\x00\x00" "PTL " "\x02\x00\x00\x00" .length = sizeof(*bgrt),
"\x01\x00" "\x00" "\x00"; .revision = 1,
CopyMem(bgrt, data, sizeof(data)); .oem_id = "Mtblx*",
.oem_table_id = "HackBGRT",
.oem_revision = 1,
.asl_compiler_id = *(const UINT32*) "None",
.asl_compiler_revision = 1,
},
.version = 1,
};
// Get the image (either old or new). // Get the image (either old or new).
BMP* new_bmp = old_bmp; BMP* new_bmp = old_bmp;