Core: Set cwd for non-ms0:/ games on boot.

This isn't ideal (games should be in ms0:/PSP/GAME/), but it gives a
better chance of games working than not setting a cwd at all.

Fixes #9785.
This commit is contained in:
Unknown W. Brackets 2017-06-07 18:52:46 -07:00
parent 2cd8bb53d5
commit 2c01bc80d0

View File

@ -289,8 +289,9 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
if (pos != std::string::npos) {
ms_path = "ms0:" + path.substr(pos);
} else {
// Hmm..
ms_path = "umd0:";
// 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.
ms_path = "umd0:/";
}
#ifdef _WIN32
@ -314,9 +315,7 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
path = rootNorm + "/";
pspFileSystem.SetStartingDirectory(filepath);
} else {
if (pos != std::string::npos) {
pspFileSystem.SetStartingDirectory(ms_path);
}
pspFileSystem.SetStartingDirectory(ms_path);
}
DirectoryFileSystem *fs = new DirectoryFileSystem(&pspFileSystem, path);