mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-29 19:30:48 +00:00
Merge pull request #2875 from Orphis/pbp-load-fix
Loader: Open PBP files even if we don't find the /PSP/GAME path
This commit is contained in:
commit
b17b120104
@ -94,36 +94,33 @@ EmuFileType Identify_File(std::string &filename)
|
||||
{
|
||||
return FILETYPE_PSP_ELF;
|
||||
}
|
||||
else
|
||||
return FILETYPE_UNKNOWN_ELF;
|
||||
return FILETYPE_UNKNOWN_ELF;
|
||||
}
|
||||
else if (id == 'PBP\x00')
|
||||
{
|
||||
if (psar_id == 'MUPN') {
|
||||
return FILETYPE_PSP_ISO_NP;
|
||||
} else {
|
||||
// Let's check if we got pointed to a PBP within such a directory.
|
||||
// If so we just move up and return the directory itself as the game.
|
||||
std::string path = getDir(filename);
|
||||
// If loading from memstick...
|
||||
size_t pos = path.find("/PSP/GAME/");
|
||||
if (pos != std::string::npos) {
|
||||
filename = path;
|
||||
return FILETYPE_PSP_PBP_DIRECTORY;
|
||||
}
|
||||
}
|
||||
|
||||
// Let's check if we got pointed to a PBP within such a directory.
|
||||
// If so we just move up and return the directory itself as the game.
|
||||
std::string path = getDir(filename);
|
||||
// If loading from memstick...
|
||||
size_t pos = path.find("/PSP/GAME/");
|
||||
if (pos != std::string::npos) {
|
||||
filename = path;
|
||||
return FILETYPE_PSP_PBP_DIRECTORY;
|
||||
}
|
||||
return FILETYPE_PSP_PBP;
|
||||
}
|
||||
else
|
||||
else if (!strcasecmp(extension.c_str(),".pbp"))
|
||||
{
|
||||
if (!strcasecmp(extension.c_str(),".pbp"))
|
||||
{
|
||||
ERROR_LOG(LOADER, "A PBP with the wrong magic number?");
|
||||
return FILETYPE_PSP_PBP;
|
||||
}
|
||||
else if (!strcasecmp(extension.c_str(),".bin"))
|
||||
{
|
||||
return FILETYPE_UNKNOWN_BIN;
|
||||
}
|
||||
ERROR_LOG(LOADER, "A PBP with the wrong magic number?");
|
||||
return FILETYPE_PSP_PBP;
|
||||
}
|
||||
else if (!strcasecmp(extension.c_str(),".bin"))
|
||||
{
|
||||
return FILETYPE_UNKNOWN_BIN;
|
||||
}
|
||||
return FILETYPE_UNKNOWN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user