mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Implement per-thread current directory
This commit is contained in:
1 parent
2f394fb7ed
commit
320c0d06c3
5 files changed
+81
-17
No files matched your search
@@ -30,8 +30,9 @@ public:
|
||||
void Mount(std::string prefix, IFileSystem *system);
|
||||
void Unmount(IFileSystem *system);
|
||||
|
||||
// Effectively "Shutdown".
|
||||
void UnmountAll();
|
||||
void ThreadEnded(int threadID);
|
||||
|
||||
void Shutdown();
|
||||
|
||||
u32 GetNewHandle() {return current++;}
|
||||
void FreeHandle(u32 handle) {}
|
||||
@@ -57,7 +58,7 @@ public:
|
||||
return SeekFile(handle, 0, FILEMOVE_CURRENT);
|
||||
}
|
||||
|
||||
virtual void ChDir(std::string dir) {currentDirectory = dir;}
|
||||
virtual void ChDir(const std::string &dir);
|
||||
|
||||
virtual bool MkDir(const std::string &dirname);
|
||||
virtual bool RmDir(const std::string &dirname);
|
||||
@@ -66,8 +67,8 @@ public:
|
||||
|
||||
// TODO: void IoCtl(...)
|
||||
|
||||
void SetCurrentDirectory(const std::string &dir) {
|
||||
currentDirectory = dir;
|
||||
void SetStartingDirectory(const std::string &dir) {
|
||||
startingDirectory = dir;
|
||||
}
|
||||
private:
|
||||
u32 current;
|
||||
@@ -78,5 +79,8 @@ private:
|
||||
};
|
||||
std::vector<System> fileSystems;
|
||||
|
||||
std::string currentDirectory;
|
||||
typedef std::map<int, std::string> currentDir_t;
|
||||
currentDir_t currentDir;
|
||||
|
||||
std::string startingDirectory;
|
||||
};
|
||||
Reference in new issue
Block a user