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.PrepareFont();
} }
ThemeX.ClearScreen(); //ThemeX.ClearScreen();
return Status; return Status;
} }

View File

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

View File

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