mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
More corrections to Custom Entries
This commit is contained in:
parent
4bed728157
commit
5eadae5eb8
@ -1850,7 +1850,14 @@ FillinCustomEntry (
|
||||
FreePool (Entry->ImagePath);
|
||||
Entry->ImagePath = NULL;
|
||||
}
|
||||
Entry->Image.LoadXImage(ThemeX.ThemeDir, Prop->string);
|
||||
if (!Entry->Image.isEmpty()) {
|
||||
XImage EmptyImage;
|
||||
Entry->Image = EmptyImage;
|
||||
}
|
||||
if (Prop->type == kTagTypeString) {
|
||||
Entry->ImagePath = PoolPrint (L"%a", Prop->string);
|
||||
}
|
||||
// we can't load the file yet, as ThemeDir is not initialized
|
||||
} else {
|
||||
UINTN DataLen = 0;
|
||||
UINT8 *TmpData = GetDataSetting (DictPointer, "ImageData", &DataLen);
|
||||
@ -1866,7 +1873,14 @@ FillinCustomEntry (
|
||||
FreePool (Entry->DriveImagePath);
|
||||
Entry->DriveImagePath = NULL;
|
||||
}
|
||||
Entry->DriveImage.LoadXImage(ThemeX.ThemeDir, Prop->string);
|
||||
if (!Entry->DriveImage.isEmpty()) {
|
||||
XImage EmptyImage;
|
||||
Entry->DriveImage = EmptyImage;
|
||||
}
|
||||
if (Prop->type == kTagTypeString) {
|
||||
Entry->DriveImagePath = PoolPrint (L"%a", Prop->string);
|
||||
}
|
||||
// we can't load the file yet, as ThemeDir is not initialized
|
||||
} else {
|
||||
UINTN DataLen = 0;
|
||||
UINT8 *TmpData = GetDataSetting (DictPointer, "ImageData", &DataLen);
|
||||
|
@ -1782,6 +1782,9 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex,
|
||||
Image = Custom->Image;
|
||||
if (Image.isEmpty() && Custom->ImagePath) {
|
||||
Image.LoadXImage(ThemeX.ThemeDir, Custom->ImagePath);
|
||||
if (Image.isEmpty()) {
|
||||
Image.LoadXImage(ThemeX.ThemeDir, XStringW() + L"os_"_XSW + Custom->ImagePath);
|
||||
}
|
||||
}
|
||||
|
||||
// Change to custom drive image if needed
|
||||
|
Loading…
Reference in New Issue
Block a user