diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/efi/graphics.c | 11 | ||||
-rw-r--r-- | src/efi/gummiboot.c | 23 |
2 files changed, 23 insertions, 11 deletions
diff --git a/src/efi/graphics.c b/src/efi/graphics.c index c85daa3..81b57e0 100644 --- a/src/efi/graphics.c +++ b/src/efi/graphics.c @@ -353,12 +353,11 @@ EFI_STATUS graphics_splash(EFI_FILE *root_dir, CHAR16 *path, if(dib->y < GraphicsOutput->Mode->Info->VerticalResolution) y_pos = (GraphicsOutput->Mode->Info->VerticalResolution - dib->y) / 2; - if (background) - uefi_call_wrapper(GraphicsOutput->Blt, 10, GraphicsOutput, - (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)background, - EfiBltVideoFill, 0, 0, 0, 0, - GraphicsOutput->Mode->Info->HorizontalResolution, - GraphicsOutput->Mode->Info->VerticalResolution, 0); + uefi_call_wrapper(GraphicsOutput->Blt, 10, GraphicsOutput, + (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)background, + EfiBltVideoFill, 0, 0, 0, 0, + GraphicsOutput->Mode->Info->HorizontalResolution, + GraphicsOutput->Mode->Info->VerticalResolution, 0); /* EFI buffer */ blt_size = dib->x * dib->y * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL); diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index 805aa0b..d405453 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -384,11 +384,12 @@ static VOID print_status(Config *config, EFI_FILE *root_dir, CHAR16 *loaded_imag /* show splash and wait for key */ for (;;) { static const EFI_GRAPHICS_OUTPUT_BLT_PIXEL colors[] = { - { .Red = 255, .Green = 255, .Blue = 255 }, - { .Red = 255, .Green = 0, .Blue = 0 }, - { .Red = 0, .Green = 255, .Blue = 0 }, - { .Red = 0, .Green = 0, .Blue = 255 }, - { .Red = 0, .Green = 0, .Blue = 0 }, + { .Red = 0xff, .Green = 0xff, .Blue = 0xff }, + { .Red = 0xc0, .Green = 0xc0, .Blue = 0xc0 }, + { .Red = 0xff, .Green = 0, .Blue = 0 }, + { .Red = 0, .Green = 0xff, .Blue = 0 }, + { .Red = 0, .Green = 0, .Blue = 0xff }, + { .Red = 0, .Green = 0, .Blue = 0 }, }; err = EFI_NOT_FOUND; @@ -1054,12 +1055,14 @@ static VOID config_defaults_load_from_file(Config *config, CHAR8 *content) { } if (strcmpa((CHAR8 *)"default", key) == 0) { + FreePool(config->entry_default_pattern); config->entry_default_pattern = stra_to_str(value); StrLwr(config->entry_default_pattern); continue; } if (strcmpa((CHAR8 *)"splash", key) == 0) { + FreePool(config->splash); config->splash = stra_to_path(value); continue; } @@ -1073,6 +1076,7 @@ static VOID config_defaults_load_from_file(Config *config, CHAR8 *content) { if (value[7] != '\0') continue; + FreePool(config->background); config->background = AllocateZeroPool(sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); if (!config->background) continue; @@ -1781,6 +1785,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { ZeroMem(&config, sizeof(Config)); config_load(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path); + if (!config.background) { + config.background = AllocateZeroPool(sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); + if (StriCmp(L"Apple", ST->FirmwareVendor) == 0) { + config.background->Red = 0xc0; + config.background->Green = 0xc0; + config.background->Blue = 0xc0; + } + } + /* if we find some well-known loaders, add them to the end of the list */ config_entry_add_loader_auto(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path, L"auto-windows", 'w', L"Windows Boot Manager", L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi"); |