mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 15:06:25 +00:00
Merge pull request #6670 from hrydgard/remount-fix
Disk swap: Remount the ISOBlockSystem too. Should fix #6662
This commit is contained in:
commit
76750376f7
@ -462,6 +462,7 @@ u32 sceUmdGetErrorStat()
|
|||||||
void __UmdReplace(std::string filepath) {
|
void __UmdReplace(std::string filepath) {
|
||||||
// Only get system from disc0 seems have been enough.
|
// Only get system from disc0 seems have been enough.
|
||||||
IFileSystem* currentUMD = pspFileSystem.GetSystem("disc0:");
|
IFileSystem* currentUMD = pspFileSystem.GetSystem("disc0:");
|
||||||
|
IFileSystem* currentISOBlock = pspFileSystem.GetSystem("umd0:");
|
||||||
if (!currentUMD)
|
if (!currentUMD)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -476,8 +477,14 @@ void __UmdReplace(std::string filepath) {
|
|||||||
if (!bd)
|
if (!bd)
|
||||||
return;
|
return;
|
||||||
umd2 = new ISOFileSystem(&pspFileSystem, bd);
|
umd2 = new ISOFileSystem(&pspFileSystem, bd);
|
||||||
|
|
||||||
pspFileSystem.Remount(currentUMD, umd2);
|
pspFileSystem.Remount(currentUMD, umd2);
|
||||||
|
|
||||||
|
if (currentUMD != currentISOBlock) {
|
||||||
|
// We mounted an ISO block system separately.
|
||||||
|
IFileSystem *iso = new ISOBlockSystem(static_cast<ISOFileSystem *>(umd2));
|
||||||
|
pspFileSystem.Remount(currentISOBlock, iso);
|
||||||
|
delete currentISOBlock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
delete currentUMD;
|
delete currentUMD;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user