mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Remount all references in Remount func.
This commit is contained in:
parent
5ef34e37b4
commit
a611ed3930
@ -255,9 +255,12 @@ void MetaFileSystem::Unmount(std::string prefix, IFileSystem *system)
|
||||
fileSystems.erase(std::remove(fileSystems.begin(), fileSystems.end(), x), fileSystems.end());
|
||||
}
|
||||
|
||||
void MetaFileSystem::Remount(std::string prefix, IFileSystem *oldSystem, IFileSystem *newSystem) {
|
||||
Unmount(prefix, oldSystem);
|
||||
Mount(prefix, newSystem);
|
||||
void MetaFileSystem::Remount(IFileSystem *oldSystem, IFileSystem *newSystem) {
|
||||
for (auto it = fileSystems.begin(); it != fileSystems.end(); ++it) {
|
||||
if (it->system == oldSystem) {
|
||||
it->system = newSystem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IFileSystem *MetaFileSystem::GetSystem(const std::string &prefix) {
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
|
||||
void Mount(std::string prefix, IFileSystem *system);
|
||||
void Unmount(std::string prefix, IFileSystem *system);
|
||||
void Remount(std::string prefix, IFileSystem *oldSystem, IFileSystem *newSystem);
|
||||
void Remount(IFileSystem *oldSystem, IFileSystem *newSystem);
|
||||
|
||||
IFileSystem *GetSystem(const std::string &prefix);
|
||||
|
||||
|
@ -463,10 +463,7 @@ void __UmdReplace(std::string filepath) {
|
||||
return;
|
||||
umd2 = new ISOFileSystem(&pspFileSystem, bd);
|
||||
|
||||
pspFileSystem.Remount("umd0:", currentUMD, umd2);
|
||||
pspFileSystem.Remount("umd1:", currentUMD, umd2);
|
||||
pspFileSystem.Remount("disc0:", currentUMD, umd2);
|
||||
pspFileSystem.Remount("umd:", currentUMD, umd2);
|
||||
pspFileSystem.Remount(currentUMD, umd2);
|
||||
}
|
||||
delete currentUMD;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user