mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
More improvements to ISO detection
This commit is contained in:
1 parent
07d47a8cc1
commit
8f76b191cd
5 files changed
+43
-27
No files matched your search
+7
-6
@@ -340,7 +340,7 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
|
||||
// Trying to boot other things lands us here. We need to return a sensible error string.
|
||||
ERROR_LOG(Log::Loader, "CPU_Init didn't recognize file. %s", errorString->c_str());
|
||||
auto sy = GetI18NCategory(I18NCat::SYSTEM);
|
||||
*errorString = sy->T("Not a PSP game"); // best string we have.
|
||||
*errorString = ApplySafeSubstitutions("%1 (%2)", sy->T("Not a PSP game"), *errorString); // best string we have.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -616,14 +616,13 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
NOTICE_LOG(Log::Boot, "PPSSPP %s", PPSSPP_GIT_VERSION);
|
||||
|
||||
Path filename = g_CoreParameter.fileToStart;
|
||||
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename));
|
||||
|
||||
IdentifiedFileType type = Identify_File(loadedFile, &g_CoreParameter.errorString);
|
||||
g_CoreParameter.fileType = type;
|
||||
IdentifiedFileType fileType;
|
||||
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename), &fileType, error_string);
|
||||
|
||||
if (System_GetPropertyBool(SYSPROP_ENOUGH_RAM_FOR_FULL_ISO)) {
|
||||
if (g_Config.bCacheFullIsoInRam) {
|
||||
switch (g_CoreParameter.fileType) {
|
||||
switch (fileType) {
|
||||
case IdentifiedFileType::PSP_ISO:
|
||||
case IdentifiedFileType::PSP_ISO_NP:
|
||||
loadedFile = new RamCachingFileLoader(loadedFile);
|
||||
@@ -635,9 +634,11 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
}
|
||||
}
|
||||
|
||||
g_CoreParameter.fileType = fileType;
|
||||
|
||||
// TODO: The reason we pass in g_CoreParameter.errorString here is that it's persistent -
|
||||
// it gets written to from the loader thread that gets spawned.
|
||||
if (!CPU_Init(loadedFile, type, &g_CoreParameter.errorString)) {
|
||||
if (!CPU_Init(loadedFile, fileType, &g_CoreParameter.errorString)) {
|
||||
CPU_Shutdown(false);
|
||||
g_CoreParameter.fileToStart.clear();
|
||||
*error_string = g_CoreParameter.errorString;
|
||||
|
||||
Reference in new issue
Block a user