Buildfixes

This commit is contained in:
Henrik Rydgård 2023-03-07 20:22:28 +01:00
parent 97cf5f8d81
commit a43b62537a
3 changed files with 9 additions and 5 deletions

View File

@ -8,8 +8,12 @@
VFS g_VFS;
void VFS::Register(const char *prefix, VFSBackend *reader) {
entries_.push_back(VFSEntry{ prefix, reader });
DEBUG_LOG(IO, "Registered VFS for prefix %s: %s", prefix, reader->toString().c_str());
if (reader) {
entries_.push_back(VFSEntry{ prefix, reader });
DEBUG_LOG(IO, "Registered VFS for prefix %s: %s", prefix, reader->toString().c_str());
} else {
ERROR_LOG(IO, "Trying to register null VFS backend for prefix %s", prefix);
}
}
void VFS::Clear() {

View File

@ -696,7 +696,7 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_init
deviceType = jdeviceType;
Path apkPath(GetJavaString(env, japkpath));
g_VFS.Register("", new ZipFileReader(apkPath, "assets/"));
g_VFS.Register("", ZipFileReader::Create(apkPath, "assets/"));
systemName = GetJavaString(env, jmodel);
langRegion = GetJavaString(env, jlangRegion);

View File

@ -483,10 +483,10 @@ int main(int argc, const char* argv[])
#if PPSSPP_PLATFORM(ANDROID)
// For some reason the debugger installs it with this name?
if (File::Exists(Path("/data/app/org.ppsspp.ppsspp-2.apk"))) {
g_VFS.Register("", new ZipFileReader(Path("/data/app/org.ppsspp.ppsspp-2.apk"), "assets/"));
g_VFS.Register("", ZipFileReader::Create(Path("/data/app/org.ppsspp.ppsspp-2.apk"), "assets/"));
}
if (File::Exists(Path("/data/app/org.ppsspp.ppsspp.apk"))) {
g_VFS.Register("", new ZipFileReader(Path("/data/app/org.ppsspp.ppsspp.apk"), "assets/"));
g_VFS.Register("", ZipFileReader::Create(Path("/data/app/org.ppsspp.ppsspp.apk"), "assets/"));
}
#elif !PPSSPP_PLATFORM(WINDOWS)
g_VFS.Register("", new DirectoryReader(g_Config.flash0Directory / ".."));