-
- if (entry->splash) {
- UINT8 *content = NULL;
- INTN len;
-
- len = file_read(root_dir, entry->splash, 0, 0, &content);
- if (len > 0) {
- for (;;) {
- static const EFI_GRAPHICS_OUTPUT_BLT_PIXEL colors[] = {
- { .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 = graphics_splash(content, len, pixel);
- if (EFI_ERROR(err))
- break;
-
- /* 'b' rotates through background colors */
- console_key_read(&key, TRUE);
- if (key != KEYPRESS(0, 0, 'b'))
- break;
- pixel = &colors[color++];
- if (color == ELEMENTSOF(colors))
- color = 0;
- }
- }
-
- FreePool(content);
- graphics_mode(FALSE);
- uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
- }
-