mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Loaders: Look for PSP/GAME/ not /PSP/GAME/.
Because upcoming Path changes will affect path string comparisons.
This commit is contained in:
1 parent
ac68dac029
commit
cc3868db97
3 files changed
+12
-6
No files matched your search
+8
-2
@@ -374,11 +374,17 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
|
||||
std::string full_path = fileLoader->GetPath();
|
||||
std::string path, file, extension;
|
||||
SplitPath(ReplaceAll(full_path, "\\", "/"), &path, &file, &extension);
|
||||
if (!path.empty() && path.back() == '/')
|
||||
path.resize(path.size() - 1);
|
||||
#ifdef _WIN32
|
||||
if (!path.empty() && path.back() == '\\')
|
||||
path.resize(path.size() - 1);
|
||||
#endif
|
||||
|
||||
size_t pos = path.find("/PSP/GAME/");
|
||||
size_t pos = path.find("PSP/GAME/");
|
||||
std::string ms_path;
|
||||
if (pos != std::string::npos) {
|
||||
ms_path = "ms0:" + path.substr(pos);
|
||||
ms_path = "ms0:/" + path.substr(pos) + "/";
|
||||
} else {
|
||||
// This is wrong, but it's better than not having a working directory at all.
|
||||
// Note that umd0:/ is actually the writable containing directory, in this case.
|
||||
|
||||
Reference in new issue
Block a user