mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Exclude redundant calls to LoadXImage in Linux Scan
This commit is contained in:
parent
95976da8c6
commit
7951eb69ba
@ -1254,11 +1254,13 @@ VOID ScanLoader(VOID)
|
|||||||
if (gSettings.LinuxScan) {
|
if (gSettings.LinuxScan) {
|
||||||
// check for linux loaders
|
// check for linux loaders
|
||||||
for (Index = 0; Index < LinuxEntryDataCount; ++Index) {
|
for (Index = 0; Index < LinuxEntryDataCount; ++Index) {
|
||||||
XImage ImageX;
|
if (FileExists(Volume->RootDir, LinuxEntryData[Index].Path)) {
|
||||||
XStringW IconXSW = XStringW().takeValueFrom(LinuxEntryData[Index].Icon);
|
XImage ImageX;
|
||||||
ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str());
|
XStringW IconXSW = XStringW().takeValueFrom(LinuxEntryData[Index].Icon);
|
||||||
AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume,
|
ImageX.LoadXImage(ThemeX.ThemeDir, (L"os_"_XSW + IconXSW.SubString(0, IconXSW.IdxOf(','))).wc_str());
|
||||||
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
AddLoaderEntry(LinuxEntryData[Index].Path, ""_XS, XStringW().takeValueFrom(LinuxEntryData[Index].Title), Volume,
|
||||||
|
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// check for linux kernels
|
// check for linux kernels
|
||||||
PartGUID = FindGPTPartitionGuidInDevicePath(Volume->DevicePath);
|
PartGUID = FindGPTPartitionGuidInDevicePath(Volume->DevicePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user