mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-30 18:14:24 +00:00
CPU_Init: Bail out earlier if we fail to identify a file.
This commit is contained in:
parent
f690cb99a4
commit
e93427c433
@ -6,6 +6,7 @@
|
||||
#include "Common/TimeUtil.h"
|
||||
|
||||
#include "android/jni/app-android.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__)
|
||||
|
||||
@ -70,6 +71,13 @@ int Android_OpenContentUriFd(std::string_view filename, Android_OpenContentUriMo
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
// Should breakpoint here to try to find and move as many of these off the EmuThread as possible
|
||||
if (!strcmp(GetCurrentThreadName(), "EmuThread")) {
|
||||
WARN_LOG(Log::IO, "Content URI opened on EmuThread: %.*s", (int)filename.size(), filename.data());
|
||||
}
|
||||
*/
|
||||
|
||||
std::string fname(filename);
|
||||
// PPSSPP adds an ending slash to directories before looking them up.
|
||||
// TODO: Fix that in the caller (or don't call this for directories).
|
||||
|
@ -289,8 +289,8 @@ bool CPU_Init(std::string *errorString, FileLoader *loadedFile) {
|
||||
break;
|
||||
default:
|
||||
// Can we even get here?
|
||||
WARN_LOG(Log::Loader, "CPU_Init didn't recognize file. %s", errorString->c_str());
|
||||
break;
|
||||
ERROR_LOG(Log::Loader, "CPU_Init didn't recognize file. %s", errorString->c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Here we have read the PARAM.SFO, let's see if we need any compatibility overrides.
|
||||
|
@ -237,8 +237,7 @@ public class PpssppActivity extends NativeActivity {
|
||||
public long computeRecursiveDirectorySize(String uriString) {
|
||||
try {
|
||||
Uri uri = Uri.parse(uriString);
|
||||
long totalSize = directorySizeRecursion(uri);
|
||||
return totalSize;
|
||||
return directorySizeRecursion(uri);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Log.e(TAG, "computeRecursiveSize exception: " + e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user