Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the DJ Max workaround more aggressive about hiding stuff. #17467

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions Core/FileSystems/DirectoryFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "Core/System.h"
#include "Core/Replay.h"
#include "Core/Reporting.h"
#include "Core/ELF/ParamSFO.h"

#ifdef _WIN32
#include "Common/CommonWindows.h"
Expand Down Expand Up @@ -830,9 +831,22 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(const std::string &p
} else {
entry.name = file.name;
}
if (hideISOFiles && (endsWithNoCase(entry.name, ".cso") || endsWithNoCase(entry.name, ".iso"))) {
// Workaround for DJ Max Portable, see compat.ini.
continue;
if (hideISOFiles) {
if (endsWithNoCase(entry.name, ".cso") || endsWithNoCase(entry.name, ".iso")) {
// Workaround for DJ Max Portable, see compat.ini.
continue;
} else if (file.isDirectory) {
if (endsWithNoCase(path, "SAVEDATA")) {
// Don't let it see savedata from other games, it can misinterpret stuff.
std::string gameID = g_paramSFO.GetDiscID();
if (entry.name.size() > 2 && !startsWithNoCase(entry.name, gameID)) {
continue;
}
} else if (file.name == "GAME" || file.name == "TEXTURES" || file.name == "PPSSPP_STATE" || equalsNoCase(file.name, "Cheats")) {
// The game scans these folders on startup which can take time. Skip them.
continue;
}
}
}
if (file.name == "..") {
entry.size = 4096;
Expand Down