mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
a separate folder for OpenRuntime-v12 for possibility to start old Clover with OpenRuntime-v11
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
24adc10b84
commit
57b93550f8
@ -1 +1 @@
|
||||
Subproject commit dc620f779455b6b9c68d7014490e3c03ec9be03f
|
||||
Subproject commit f0926840864a5538782e53eae465c3c409dfbb8e
|
@ -605,8 +605,9 @@ static XStringW getDriversPath()
|
||||
} else {
|
||||
return L"drivers64"_XSW; //backward compatibility
|
||||
}
|
||||
} else
|
||||
if (FileExists(&self.getCloverDir(), L"drivers\\UEFI")) {
|
||||
} else if (FileExists(&self.getCloverDir(), L"drivers\\5142")) {
|
||||
return L"drivers\\5142"_XSW;
|
||||
} else if (FileExists(&self.getCloverDir(), L"drivers\\UEFI")) {
|
||||
return L"drivers\\UEFI"_XSW;
|
||||
} else {
|
||||
return L"drivers64UEFI"_XSW;
|
||||
@ -1814,7 +1815,7 @@ static void ScanDriverDir(IN CONST CHAR16 *Path, OUT EFI_HANDLE **DriversToConne
|
||||
DriversArrSize = 0;
|
||||
DriversArrNum = 0;
|
||||
DriversArr = NULL;
|
||||
OpenRuntimeEfiName.setEmpty();
|
||||
// OpenRuntimeEfiName.setEmpty();
|
||||
|
||||
//only one driver with highest priority will obtain status "Loaded"
|
||||
DirIterOpen(&self.getCloverDir(), Path, &DirIter);
|
||||
@ -1857,18 +1858,27 @@ static void ScanDriverDir(IN CONST CHAR16 *Path, OUT EFI_HANDLE **DriversToConne
|
||||
if ( LStringW(DirEntry->FileName).containsIC("AptioMemoryFix") ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( LStringW(DirEntry->FileName).containsIC("OpenRuntime") ) {
|
||||
if (!OpenRuntimeEfiName.isEmpty()) {
|
||||
DBG(" - OpenRuntime already detected\n");
|
||||
continue;
|
||||
}
|
||||
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v12.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.7.5") ) {
|
||||
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
|
||||
DBG(" - OpenRuntime-v12 for 075 taken from %ls\n", getDriversPath().wc_str());
|
||||
}else
|
||||
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v12.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.7.3") ) {
|
||||
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
|
||||
DBG(" - OpenRuntime-v12 for 073 taken from %ls\n", getDriversPath().wc_str());
|
||||
}else
|
||||
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v11.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.6.5") ) {
|
||||
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
|
||||
DBG(" - OpenRuntime-v11 for 065 taken from %ls\n", getDriversPath().wc_str());
|
||||
}else
|
||||
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v11.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.6.1") ) {
|
||||
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
|
||||
DBG(" - OpenRuntime-v11 for 061 taken from %ls\n", getDriversPath().wc_str());
|
||||
}else
|
||||
if ( OpenRuntimeEfiName.isEmpty() ) {
|
||||
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
|
||||
@ -2231,12 +2241,17 @@ static void LoadDrivers(void)
|
||||
} else {
|
||||
ScanDriverDir(L"drivers64", &DriversToConnect, &DriversToConnectNum);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
OpenRuntimeEfiName.setEmpty();
|
||||
if (FileExists(&self.getCloverDir(), L"drivers\\5142")) {
|
||||
ScanDriverDir(L"drivers\\5142", &DriversToConnect, &DriversToConnectNum);
|
||||
}
|
||||
if (FileExists(&self.getCloverDir(), L"drivers\\UEFI")) {
|
||||
ScanDriverDir(L"drivers\\UEFI", &DriversToConnect, &DriversToConnectNum);
|
||||
} else {
|
||||
ScanDriverDir(L"drivers64UEFI", &DriversToConnect, &DriversToConnectNum);
|
||||
}
|
||||
}
|
||||
#else
|
||||
ScanDriverDir(L"drivers32", &DriversToConnect, &DriversToConnectNum);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user