ReinitRefitLib after Starting an efi image.

This commit is contained in:
jief666 2020-10-05 23:45:14 +03:00
parent 53645a4240
commit 2bc776d63e
3 changed files with 6 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public:
EFI_STATUS reInitialize();
void closeHandle();
bool isInitialized() const { return m_SelfImageHandle != NULL; }
bool isInitialized() const { return m_CloverDir != NULL; }
EFI_HANDLE getSelfImageHandle() { return m_SelfImageHandle; }
const EFI_LOADED_IMAGE& getSelfLoadedImage() { return *m_SelfLoadedImage; }

View File

@ -3333,6 +3333,10 @@ GetListOfThemes ()
DbgHeader("GetListOfThemes");
ThemeNameArray.setEmpty();
if ( !self.themesDirExists() ) {
DBG("No theme dir was discovered\n");
return;
}
DirIterOpen(&self.getThemesDir(), NULL, &DirIter);
while (DirIterNext(&DirIter, 1, L"*", &DirEntry)) {
if (DirEntry->FileName[0] == '.') {

View File

@ -270,6 +270,7 @@ static EFI_STATUS StartEFILoadedImage(IN EFI_HANDLE ChildImageHandle,
//PauseForKey(L"Returned from StartImage\n");
ReinitRefitLib();
// control returns here when the child image calls Exit()
if (ImageTitle.notEmpty()) {
snwprintf(ErrorInfo, 512, "returned from %ls", ImageTitle.s());