mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-02 19:13:36 +00:00
Added SysEmulationDir to set $(EmulationDir) to custom location.
This commit is contained in:
parent
952098c00f
commit
5f6afca18a
@ -5,6 +5,7 @@
|
|||||||
#include "vfsDeviceLocalFile.h"
|
#include "vfsDeviceLocalFile.h"
|
||||||
#include "Ini.h"
|
#include "Ini.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
|
#include "Utilities/Log.h"
|
||||||
|
|
||||||
#undef CreateFile
|
#undef CreateFile
|
||||||
|
|
||||||
@ -429,7 +430,11 @@ void VFS::Init(const std::string& path)
|
|||||||
|
|
||||||
std::string mpath = entry.path;
|
std::string mpath = entry.path;
|
||||||
// TODO: This shouldn't use current dir
|
// TODO: This shouldn't use current dir
|
||||||
fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
|
// If no value assigned to SysEmulationDirPath in INI, use the path that with executable.
|
||||||
|
if (Ini.SysEmulationDirPath.GetValue().empty())
|
||||||
|
Ini.SysEmulationDirPath.SetValue(Emu.GetEmulatorPath());
|
||||||
|
LOG_NOTICE(GENERAL, "$(EmulatorDir) binded to %s.", Ini.SysEmulationDirPath.GetValue());
|
||||||
|
fmt::Replace(mpath, "$(EmulatorDir)", Ini.SysEmulationDirPath.GetValue());
|
||||||
fmt::Replace(mpath, "$(GameDir)", cwd);
|
fmt::Replace(mpath, "$(GameDir)", cwd);
|
||||||
Mount(entry.mount, mpath, dev);
|
Mount(entry.mount, mpath, dev);
|
||||||
}
|
}
|
||||||
|
11
rpcs3/Ini.h
11
rpcs3/Ini.h
@ -163,6 +163,9 @@ public:
|
|||||||
IniEntry<bool> DBGAutoPauseSystemCall;
|
IniEntry<bool> DBGAutoPauseSystemCall;
|
||||||
IniEntry<bool> DBGAutoPauseFunctionCall;
|
IniEntry<bool> DBGAutoPauseFunctionCall;
|
||||||
|
|
||||||
|
//Customed EmulationDir
|
||||||
|
IniEntry<std::string> SysEmulationDirPath;
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
IniEntry<u8> SysLanguage;
|
IniEntry<u8> SysLanguage;
|
||||||
|
|
||||||
@ -240,6 +243,9 @@ public:
|
|||||||
DBGAutoPauseFunctionCall.Init("DBG_AutoPauseFunctionCall", path);
|
DBGAutoPauseFunctionCall.Init("DBG_AutoPauseFunctionCall", path);
|
||||||
DBGAutoPauseSystemCall.Init("DBG_AutoPauseSystemCall", path);
|
DBGAutoPauseSystemCall.Init("DBG_AutoPauseSystemCall", path);
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Init("System_EmulationDir", path);
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
SysLanguage.Init("Sytem_SysLanguage", path);
|
SysLanguage.Init("Sytem_SysLanguage", path);
|
||||||
}
|
}
|
||||||
@ -316,6 +322,8 @@ public:
|
|||||||
// Language
|
// Language
|
||||||
SysLanguage.Load(1);
|
SysLanguage.Load(1);
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Load("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Save()
|
void Save()
|
||||||
@ -389,6 +397,9 @@ public:
|
|||||||
|
|
||||||
// Language
|
// Language
|
||||||
SysLanguage.Save();
|
SysLanguage.Save();
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user