mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Bubble up more error messages to the user
This commit is contained in:
1 parent
8a431e2ec2
commit
4fb3a0e370
4 files changed
+41
-31
No files matched your search
+7
-8
@@ -340,7 +340,6 @@ 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 = ApplySafeSubstitutions("%1 (%2)", sy->T("Not a PSP game"), *errorString); // best string we have.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -600,7 +599,7 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
}
|
||||
g_CoreParameter.errorString.clear();
|
||||
|
||||
std::string *error_string = &g_CoreParameter.errorString;
|
||||
std::string *errorString = &g_CoreParameter.errorString;
|
||||
|
||||
INFO_LOG(Log::Loader, "Starting loader thread...");
|
||||
|
||||
@@ -608,7 +607,7 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
|
||||
Core_NotifyLifecycle(CoreLifecycle::STARTING);
|
||||
|
||||
g_loadingThread = std::thread([error_string]() {
|
||||
g_loadingThread = std::thread([errorString]() {
|
||||
SetCurrentThreadName("ExecLoader");
|
||||
|
||||
AndroidJNIThreadContext jniContext;
|
||||
@@ -618,7 +617,7 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
Path filename = g_CoreParameter.fileToStart;
|
||||
|
||||
IdentifiedFileType fileType;
|
||||
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename), &fileType, error_string);
|
||||
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename), &fileType, errorString);
|
||||
|
||||
if (System_GetPropertyBool(SYSPROP_ENOUGH_RAM_FOR_FULL_ISO)) {
|
||||
if (g_Config.bCacheFullIsoInRam) {
|
||||
@@ -641,9 +640,9 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
if (!CPU_Init(loadedFile, fileType, &g_CoreParameter.errorString)) {
|
||||
CPU_Shutdown(false);
|
||||
g_CoreParameter.fileToStart.clear();
|
||||
*error_string = g_CoreParameter.errorString;
|
||||
if (error_string->empty()) {
|
||||
*error_string = "Failed initializing CPU/Memory";
|
||||
*errorString = g_CoreParameter.errorString;
|
||||
if (errorString->empty()) {
|
||||
*errorString = "Failed initializing CPU/Memory";
|
||||
}
|
||||
g_bootState = BootState::Failed;
|
||||
return;
|
||||
@@ -652,7 +651,7 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
// Initialize the GPU as far as we can here (do things like load cache files).
|
||||
_dbg_assert_(!gpu);
|
||||
#ifndef __LIBRETRO__
|
||||
InitGPU(error_string);
|
||||
InitGPU(errorString);
|
||||
#endif
|
||||
g_bootState = BootState::Complete;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user