Make the IsValidPBP DISC_ID check a bit more lenient. Fixes an issue where some homebrew would no longer show in the list.

This commit is contained in:
Henrik Rydgård 2020-05-17 15:12:38 +02:00
parent 7c8bcb2ee4
commit 9ed9468d72
2 changed files with 4 additions and 3 deletions

View File

@ -601,7 +601,7 @@ void GameBrowser::Draw(UIContext &dc) {
}
}
static bool IsValidPBP(const std::string &path) {
static bool IsValidPBP(const std::string &path, bool allowHomebrew) {
if (!File::Exists(path))
return false;
@ -613,7 +613,7 @@ static bool IsValidPBP(const std::string &path) {
ParamSFOData sfo;
sfo.ReadSFO(sfoData);
if (sfo.GetValueString("DISC_ID").empty())
if (!allowHomebrew && sfo.GetValueString("DISC_ID").empty())
return false;
if (sfo.GetValueString("CATEGORY") == "ME")
@ -705,7 +705,7 @@ void GameBrowser::Refresh() {
bool isGame = !fileInfo[i].isDirectory;
bool isSaveData = false;
// Check if eboot directory
if (!isGame && path_.GetPath().size() >= 4 && IsValidPBP(path_.GetPath() + fileInfo[i].name + "/EBOOT.PBP"))
if (!isGame && path_.GetPath().size() >= 4 && IsValidPBP(path_.GetPath() + fileInfo[i].name + "/EBOOT.PBP", true))
isGame = true;
else if (!isGame && File::Exists(path_.GetPath() + fileInfo[i].name + "/PSP_GAME/SYSDIR"))
isGame = true;

View File

@ -287,6 +287,7 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
info.isDirectory = isDirectory(info.fullName);
info.exists = true;
info.size = 0;
info.isWritable = false; // TODO - implement some kind of check
if (!info.isDirectory) {
std::string ext = getFileExtension(info.fullName);
if (filter) {