From 30030cb9c76f8efbd4393f1323fd19fa06c0b217 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 22 Dec 2013 21:48:45 +0100 Subject: cosmetics for 'P' splash loop --- src/efi/gummiboot.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index e018ffd..90770c8 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -381,32 +381,32 @@ static VOID print_status(Config *config, EFI_FILE *root_dir, CHAR16 *loaded_imag uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); + /* 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 }, + }; err = EFI_NOT_FOUND; if (config->splash) err = graphics_splash(root_dir, config->splash, pixel); if (EFI_ERROR(err)) err = graphics_splash(root_dir, L"\\EFI\\gummiboot\\splash.bmp", pixel); - if (!EFI_ERROR(err)) { - 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 }, - }; - - console_key_read(&key, TRUE); - - /* 'b' rotates through background colors */ - if (key == KEYPRESS(0, 0, 'b')) { - pixel = &colors[color++]; - if (color == ELEMENTSOF(colors)) - color = 0; + if (EFI_ERROR(err)) + break; - continue; - } + /* 'b' rotates through background colors */ + console_key_read(&key, TRUE); + if (key == KEYPRESS(0, 0, 'b')) { + pixel = &colors[color++]; + if (color == ELEMENTSOF(colors)) + color = 0; + + continue; } graphics_mode(FALSE); -- cgit v1.2.3