mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
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:
parent
7c8bcb2ee4
commit
9ed9468d72
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user