summaryrefslogtreecommitdiff
path: root/src/boot/efi/graphics.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2015-02-26 18:33:37 +0100
committerKay Sievers <kay@vrfy.org>2015-02-26 18:58:30 +0100
commit37fa369066c2db1ecc6c7046192503aedc2431f6 (patch)
treec883a3410dd3716c58e2de24ee5d2b8f5f73710e /src/boot/efi/graphics.c
parent03455c2879699852b691903343e378c28992ff6a (diff)
boot: efi - support embedded splash image
Diffstat (limited to 'src/boot/efi/graphics.c')
-rw-r--r--src/boot/efi/graphics.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/boot/efi/graphics.c b/src/boot/efi/graphics.c
index 9fbcbc10ba..124022a68f 100644
--- a/src/boot/efi/graphics.c
+++ b/src/boot/efi/graphics.c
@@ -322,6 +322,7 @@ EFI_STATUS bmp_to_blt(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *buf,
}
EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = {};
EFI_GUID GraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput = NULL;
struct bmp_dib *dib;
@@ -333,6 +334,15 @@ EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_
UINTN y_pos = 0;
EFI_STATUS err;
+ if (!background) {
+ if (StriCmp(L"Apple", ST->FirmwareVendor) == 0) {
+ pixel.Red = 0xc0;
+ pixel.Green = 0xc0;
+ pixel.Blue = 0xc0;
+ }
+ background = &pixel;
+ }
+
err = LibLocateProtocol(&GraphicsOutputProtocolGuid, (VOID **)&GraphicsOutput);
if (EFI_ERROR(err))
return err;