BOOLEAN exit = FALSE;
BOOLEAN run = TRUE;
BOOLEAN wait = FALSE;
- BOOLEAN cleared_screen = FALSE;
graphics_mode(FALSE);
uefi_call_wrapper(ST->ConIn->Reset, 2, ST->ConIn, FALSE);
if (config->console_mode_change != CONSOLE_MODE_KEEP) {
err = console_set_mode(&config->console_mode, config->console_mode_change);
- if (!EFI_ERROR(err))
- cleared_screen = TRUE;
- }
-
- if (!cleared_screen)
+ if (EFI_ERROR(err)) {
+ uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
+ Print(L"Error switching console mode to %ld: %r.\r", (UINT64)config->console_mode, err);
+ }
+ } else
uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
- if (config->console_mode_change != CONSOLE_MODE_KEEP && EFI_ERROR(err))
- Print(L"Error switching console mode to %ld: %r.\r", (UINT64)config->console_mode, err);
-
err = uefi_call_wrapper(ST->ConOut->QueryMode, 4, ST->ConOut, ST->ConOut->Mode->Mode, &x_max, &y_max);
if (EFI_ERROR(err)) {
x_max = 80;