mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Use a FileLoader for PBPs.
Improves consistency, caching, etc.
This commit is contained in:
1 parent
a53f0360f3
commit
f3df6b307f
6 files changed
+45
-59
No files matched your search
@@ -322,16 +322,19 @@ public:
|
||||
case FILETYPE_PSP_PBP:
|
||||
case FILETYPE_PSP_PBP_DIRECTORY:
|
||||
{
|
||||
std::string pbpFile = filename;
|
||||
if (info_->fileType == FILETYPE_PSP_PBP_DIRECTORY)
|
||||
pbpFile += "/EBOOT.PBP";
|
||||
FileLoader *pbpLoader = info_->GetFileLoader();
|
||||
std::unique_ptr<FileLoader> altLoader;
|
||||
if (info_->fileType == FILETYPE_PSP_PBP_DIRECTORY) {
|
||||
pbpLoader = ConstructFileLoader(pbpLoader->Path() + "/EBOOT.PBP");
|
||||
altLoader.reset(pbpLoader);
|
||||
}
|
||||
|
||||
PBPReader pbp(pbpFile.c_str());
|
||||
PBPReader pbp(pbpLoader);
|
||||
if (!pbp.IsValid()) {
|
||||
if (pbp.IsELF()) {
|
||||
goto handleELF;
|
||||
}
|
||||
ERROR_LOG(LOADER, "invalid pbp %s\n", pbpFile.c_str());
|
||||
ERROR_LOG(LOADER, "invalid pbp %s\n", pbpLoader->Path().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user