mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Bubble up CSO corruption errors so the user can see them
This commit is contained in:
1 parent
64fcce3e69
commit
998d385119
4 files changed
+12
-1
No files matched your search
+3
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -881,6 +881,9 @@ handleELF:
|
||||
case IdentifiedFileType::NORMAL_DIRECTORY:
|
||||
default:
|
||||
info_->title = info_->GetFilePath().GetFilename();
|
||||
if (info_->errorString.empty()) {
|
||||
info_->errorString = errorString;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -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().
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user