Bubble up CSO corruption errors so the user can see them

This commit is contained in:
Henrik Rydgård committed 2026-02-03 11:57:05 +01:00
1 parent 64fcce3e69
commit 998d385119
4 files changed
+12 -1

No files matched your search

+3 -1
View File
@@ -340,7 +340,9 @@ 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");
if (errorString->empty()) {
*errorString = sy->T("Not a PSP game");
}
return false;
}
}
+3
View File
@@ -881,6 +881,9 @@ handleELF:
case IdentifiedFileType::NORMAL_DIRECTORY:
default:
info_->title = info_->GetFilePath().GetFilename();
if (info_->errorString.empty()) {
info_->errorString = errorString;
}
break;
}
+2
View File
@@ -167,6 +167,8 @@ public:
u64 saveDataSize = 0;
u64 installDataSize = 0;
std::string errorString;
protected:
ParamSFOData paramSFO;
// Note: this can change while loading, use GetTitle().
+4
View File
@@ -224,6 +224,10 @@ void GameScreen::CreateContentViews(UI::ViewGroup *parent) {
TextView *tvID = mainGameInfo->Add(new TextView(regionID, ALIGN_LEFT | FLAG_WRAP_TEXT, true, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
tvID->SetShadow(true);
if (!info_->errorString.empty()) {
mainGameInfo->Add(new NoticeView(NoticeLevel::WARN, info_->errorString, ""));
}
}
LinearLayout *infoLayout = new LinearLayout(ORIENT_VERTICAL, new AnchorLayoutParams(10, 200, NONE, NONE));