mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix further issues when the memstick dir is the PSP dir
This commit is contained in:
parent
d14a90001b
commit
b3c2252b28
2 changed files with 6 additions and 4 deletions
|
@ -187,7 +187,7 @@ Path DirectoryFileHandle::GetLocalPath(const Path &basePath, std::string localpa
|
|||
localpath.erase(0, 1);
|
||||
|
||||
if (fileSystemFlags_ & FileSystemFlags::STRIP_PSP) {
|
||||
if (startsWith(localpath, "/PSP")) {
|
||||
if (startsWith(localpath, "PSP/")) {
|
||||
localpath = localpath.substr(4);
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ Path DirectoryFileSystem::GetLocalPath(std::string internalPath) const {
|
|||
internalPath.erase(0, 1);
|
||||
|
||||
if (flags & FileSystemFlags::STRIP_PSP) {
|
||||
if (startsWith(internalPath, "/PSP")) {
|
||||
if (startsWith(internalPath, "PSP/")) {
|
||||
internalPath = internalPath.substr(4);
|
||||
}
|
||||
}
|
||||
|
@ -638,6 +638,7 @@ bool DirectoryFileSystem::RemoveFile(const std::string &filename) {
|
|||
|
||||
int DirectoryFileSystem::OpenFile(std::string filename, FileAccess access, const char *devicename) {
|
||||
OpenFileEntry entry;
|
||||
entry.hFile.fileSystemFlags_ = flags;
|
||||
u32 err = 0;
|
||||
bool success = entry.hFile.Open(basePath, filename, access, err);
|
||||
if (err == 0 && !success) {
|
||||
|
@ -964,6 +965,7 @@ void DirectoryFileSystem::DoState(PointerWrap &p) {
|
|||
CloseAll();
|
||||
u32 key;
|
||||
OpenFileEntry entry;
|
||||
entry.hFile.fileSystemFlags_ = flags;
|
||||
for (u32 i = 0; i < num; i++) {
|
||||
Do(p, key);
|
||||
Do(p, entry.guestFilename);
|
||||
|
|
|
@ -708,8 +708,8 @@ void InitSysDirectories() {
|
|||
|
||||
// Create the default directories that a real PSP creates. Good for homebrew so they can
|
||||
// expect a standard environment. Skipping THEME though, that's pointless.
|
||||
File::CreateDir(g_Config.memStickDirectory / "PSP");
|
||||
File::CreateDir(g_Config.memStickDirectory / "PSP/COMMON");
|
||||
File::CreateDir(GetSysDirectory(DIRECTORY_PSP));
|
||||
File::CreateDir(GetSysDirectory(DIRECTORY_PSP) / "COMMON");
|
||||
File::CreateDir(GetSysDirectory(DIRECTORY_GAME));
|
||||
File::CreateDir(GetSysDirectory(DIRECTORY_SAVEDATA));
|
||||
File::CreateDir(GetSysDirectory(DIRECTORY_SAVESTATE));
|
||||
|
|
Loading…
Add table
Reference in a new issue