Permalink
Browse files

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.
  • Loading branch information...
unknownbrackets committed Jun 8, 2017
1 parent 2cd8bb5 commit 2c01bc80d0e4e69486447ab22c774ec7ece55df8
Showing with 4 additions and 5 deletions.
  1. +4 −5 Core/PSPLoaders.cpp
View
@@ -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);

0 comments on commit 2c01bc8

Please sign in to comment.