mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-01 16:13:23 +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 "Ini.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
||||
#undef CreateFile
|
||||
|
||||
@ -429,7 +430,11 @@ void VFS::Init(const std::string& path)
|
||||
|
||||
std::string mpath = entry.path;
|
||||
// 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);
|
||||
Mount(entry.mount, mpath, dev);
|
||||
}
|
||||
|
11
rpcs3/Ini.h
11
rpcs3/Ini.h
@ -163,6 +163,9 @@ public:
|
||||
IniEntry<bool> DBGAutoPauseSystemCall;
|
||||
IniEntry<bool> DBGAutoPauseFunctionCall;
|
||||
|
||||
//Customed EmulationDir
|
||||
IniEntry<std::string> SysEmulationDirPath;
|
||||
|
||||
// Language
|
||||
IniEntry<u8> SysLanguage;
|
||||
|
||||
@ -240,6 +243,9 @@ public:
|
||||
DBGAutoPauseFunctionCall.Init("DBG_AutoPauseFunctionCall", path);
|
||||
DBGAutoPauseSystemCall.Init("DBG_AutoPauseSystemCall", path);
|
||||
|
||||
// Customed EmulationDir
|
||||
SysEmulationDirPath.Init("System_EmulationDir", path);
|
||||
|
||||
// Language
|
||||
SysLanguage.Init("Sytem_SysLanguage", path);
|
||||
}
|
||||
@ -316,6 +322,8 @@ public:
|
||||
// Language
|
||||
SysLanguage.Load(1);
|
||||
|
||||
// Customed EmulationDir
|
||||
SysEmulationDirPath.Load("");
|
||||
}
|
||||
|
||||
void Save()
|
||||
@ -389,6 +397,9 @@ public:
|
||||
|
||||
// Language
|
||||
SysLanguage.Save();
|
||||
|
||||
// Customed EmulationDir
|
||||
SysEmulationDirPath.Save();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user