mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Correct Linux scan
This commit is contained in:
parent
bc4fba913b
commit
f81078e79b
@ -1850,9 +1850,7 @@ FillinCustomEntry (
|
|||||||
FreePool (Entry->ImagePath);
|
FreePool (Entry->ImagePath);
|
||||||
Entry->ImagePath = NULL;
|
Entry->ImagePath = NULL;
|
||||||
}
|
}
|
||||||
if (!Entry->Image.isEmpty()) {
|
Entry->Image.setEmpty();
|
||||||
Entry->Image.setEmpty();
|
|
||||||
}
|
|
||||||
if (Prop->type == kTagTypeString) {
|
if (Prop->type == kTagTypeString) {
|
||||||
Entry->ImagePath = PoolPrint (L"%a", Prop->string);
|
Entry->ImagePath = PoolPrint (L"%a", Prop->string);
|
||||||
}
|
}
|
||||||
@ -1872,9 +1870,7 @@ FillinCustomEntry (
|
|||||||
FreePool (Entry->DriveImagePath);
|
FreePool (Entry->DriveImagePath);
|
||||||
Entry->DriveImagePath = NULL;
|
Entry->DriveImagePath = NULL;
|
||||||
}
|
}
|
||||||
if (!Entry->DriveImage.isEmpty()) {
|
Entry->DriveImage.setEmpty();
|
||||||
Entry->DriveImage.setEmpty();
|
|
||||||
}
|
|
||||||
if (Prop->type == kTagTypeString) {
|
if (Prop->type == kTagTypeString) {
|
||||||
Entry->DriveImagePath = PoolPrint (L"%a", Prop->string);
|
Entry->DriveImagePath = PoolPrint (L"%a", Prop->string);
|
||||||
}
|
}
|
||||||
|
@ -1241,7 +1241,8 @@ VOID ScanLoader(VOID)
|
|||||||
}
|
}
|
||||||
if (aFound && (aFound == aIndex)) {
|
if (aFound && (aFound == aIndex)) {
|
||||||
XImage ImageX;
|
XImage ImageX;
|
||||||
ImageX.LoadXImage(ThemeX.ThemeDir, AndroidEntryData[Index].Icon);
|
XStringW IconXSW = XStringW().takeValueFrom(AndroidEntryData[Index].Icon);
|
||||||
|
ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str());
|
||||||
AddLoaderEntry(AndroidEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(AndroidEntryData[Index].Title), Volume,
|
AddLoaderEntry(AndroidEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(AndroidEntryData[Index].Title), Volume,
|
||||||
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
||||||
}
|
}
|
||||||
@ -1254,6 +1255,8 @@ VOID ScanLoader(VOID)
|
|||||||
// check for linux loaders
|
// check for linux loaders
|
||||||
for (Index = 0; Index < LinuxEntryDataCount; ++Index) {
|
for (Index = 0; Index < LinuxEntryDataCount; ++Index) {
|
||||||
XImage ImageX;
|
XImage ImageX;
|
||||||
|
XStringW IconXSW = XStringW().takeValueFrom(LinuxEntryData[Index].Icon);
|
||||||
|
ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str());
|
||||||
ImageX.LoadXImage(ThemeX.ThemeDir, LinuxEntryData[Index].Icon);
|
ImageX.LoadXImage(ThemeX.ThemeDir, LinuxEntryData[Index].Icon);
|
||||||
AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume,
|
AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume,
|
||||||
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
||||||
@ -1783,7 +1786,7 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex,
|
|||||||
if (Image.isEmpty() && Custom->ImagePath) {
|
if (Image.isEmpty() && Custom->ImagePath) {
|
||||||
Image.LoadXImage(ThemeX.ThemeDir, Custom->ImagePath);
|
Image.LoadXImage(ThemeX.ThemeDir, Custom->ImagePath);
|
||||||
if (Image.isEmpty()) {
|
if (Image.isEmpty()) {
|
||||||
Image.LoadXImage(ThemeX.ThemeDir, XStringW() + L"os_"_XSW + Custom->ImagePath);
|
Image.LoadXImage(ThemeX.ThemeDir, L"os_"_XSW + Custom->ImagePath);
|
||||||
if (Image.isEmpty()) {
|
if (Image.isEmpty()) {
|
||||||
Image.LoadXImage(SelfDir, Custom->ImagePath);
|
Image.LoadXImage(SelfDir, Custom->ImagePath);
|
||||||
if (Image.isEmpty()) {
|
if (Image.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user