diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp index 815418deb..ec4a7bad4 100644 --- a/rEFIt_UEFI/Platform/Settings.cpp +++ b/rEFIt_UEFI/Platform/Settings.cpp @@ -1851,8 +1851,7 @@ FillinCustomEntry ( Entry->ImagePath = NULL; } if (!Entry->Image.isEmpty()) { - XImage EmptyImage; - Entry->Image = EmptyImage; + Entry->Image.setEmpty(); } if (Prop->type == kTagTypeString) { Entry->ImagePath = PoolPrint (L"%a", Prop->string); @@ -1874,8 +1873,7 @@ FillinCustomEntry ( Entry->DriveImagePath = NULL; } if (!Entry->DriveImage.isEmpty()) { - XImage EmptyImage; - Entry->DriveImage = EmptyImage; + Entry->DriveImage.setEmpty(); } if (Prop->type == kTagTypeString) { Entry->DriveImagePath = PoolPrint (L"%a", Prop->string); diff --git a/rEFIt_UEFI/entry_scan/loader.cpp b/rEFIt_UEFI/entry_scan/loader.cpp index 389426f81..32cf52e46 100644 --- a/rEFIt_UEFI/entry_scan/loader.cpp +++ b/rEFIt_UEFI/entry_scan/loader.cpp @@ -1784,6 +1784,15 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex, Image.LoadXImage(ThemeX.ThemeDir, Custom->ImagePath); if (Image.isEmpty()) { Image.LoadXImage(ThemeX.ThemeDir, XStringW() + L"os_"_XSW + Custom->ImagePath); + if (Image.isEmpty()) { + Image.LoadXImage(SelfDir, Custom->ImagePath); + if (Image.isEmpty()) { + Image.LoadXImage(SelfRootDir, Custom->ImagePath); + if (Image.isEmpty()) { + Image.LoadXImage(Volume->RootDir, Custom->ImagePath); + } + } + } } } @@ -1791,6 +1800,15 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex, DriveImage = Custom->DriveImage; if (DriveImage.isEmpty() && Custom->DriveImagePath) { DriveImage.LoadXImage(ThemeX.ThemeDir, Custom->DriveImagePath); + if (DriveImage.isEmpty()) { + DriveImage.LoadXImage(SelfDir, Custom->ImagePath); + if (DriveImage.isEmpty()) { + DriveImage.LoadXImage(SelfRootDir, Custom->ImagePath); + if (DriveImage.isEmpty()) { + DriveImage.LoadXImage(Volume->RootDir, Custom->ImagePath); + } + } + } } do