Move initial theme draw to before menu run, to prevent theme appearing when menu is unused, and visual delay in system scans

This commit is contained in:
asava 2020-04-16 19:21:13 +03:00
parent efe9aaa257
commit cde5fa908c
3 changed files with 7 additions and 2 deletions

View File

@ -4073,7 +4073,7 @@ finish:
ThemeX.PrepareFont();
}
ThemeX.ClearScreen();
//ThemeX.ClearScreen();
return Status;
}

View File

@ -122,6 +122,7 @@ UINTN QuerySecureBootUser(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
InitScreen(FALSE);
if (gThemeNeedInit) {
InitTheme(TRUE, NULL);
ThemeX.ClearScreen();
gThemeNeedInit = FALSE;
}
gGuiIsReady = TRUE;

View File

@ -2409,13 +2409,13 @@ RefitMain (IN EFI_HANDLE ImageHandle,
if (gThemeNeedInit) {
InitTheme(TRUE, &Now);
gThemeNeedInit = FALSE;
gThemeChanged = TRUE;
} else if (gThemeChanged) {
DBG("change theme\n");
InitTheme(FALSE, NULL);
OptionMenu.FreeMenu();
}
DBG("theme inited\n");
gThemeChanged = FALSE;
if (ThemeX.embedded) {
DBG("Chosen embedded theme\n");
} else {
@ -2542,6 +2542,10 @@ RefitMain (IN EFI_HANDLE ImageHandle,
MenuExit = MENU_EXIT_TIMEOUT;
} else {
MainMenu.GetAnime();
if (gThemeChanged) {
gThemeChanged = FALSE;
ThemeX.ClearScreen();
}
MenuExit = MainMenu.RunMainMenu(DefaultIndex, &ChosenEntry);
}
// DBG("exit from MainMenu %llu\n", MenuExit); //MENU_EXIT_ENTER=(1) MENU_EXIT_DETAILS=3