I forgot to save the EmulationDirEnable.. Also just show the bind once.
This commit is contained in:
+11
-5
@@ -433,15 +433,10 @@ void VFS::Init(const std::string& path)
|
|||||||
// If no value assigned to SysEmulationDirPath in INI, use the path that with executable.
|
// If no value assigned to SysEmulationDirPath in INI, use the path that with executable.
|
||||||
if (Ini.SysEmulationDirPathEnable.GetValue())
|
if (Ini.SysEmulationDirPathEnable.GetValue())
|
||||||
{
|
{
|
||||||
if (Ini.SysEmulationDirPath.GetValue().empty())
|
|
||||||
Ini.SysEmulationDirPath.SetValue(Emu.GetEmulatorPath());
|
|
||||||
LOG_NOTICE(GENERAL, "EmualtionDir: Custom EmulationDir is On, Binded $(EmulatorDir) to %s.",
|
|
||||||
Ini.SysEmulationDirPath.GetValue());
|
|
||||||
fmt::Replace(mpath, "$(EmulatorDir)", Ini.SysEmulationDirPath.GetValue());
|
fmt::Replace(mpath, "$(EmulatorDir)", Ini.SysEmulationDirPath.GetValue());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_NOTICE(GENERAL, "EmualtionDir: Custom EmulationDir is Off, Binded $(EmulatorDir) to %s.", Emu.GetEmulatorPath());
|
|
||||||
fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
|
fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
|
||||||
}
|
}
|
||||||
fmt::Replace(mpath, "$(GameDir)", cwd);
|
fmt::Replace(mpath, "$(GameDir)", cwd);
|
||||||
@@ -482,6 +477,17 @@ void VFS::SaveLoadDevices(std::vector<VFSManagerEntry>& res, bool is_load)
|
|||||||
entries_count.SaveValue(count);
|
entries_count.SaveValue(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Custom EmulationDir. should check if that is a valid directory.
|
||||||
|
if (Ini.SysEmulationDirPathEnable.GetValue())
|
||||||
|
{
|
||||||
|
if (Ini.SysEmulationDirPath.GetValue().empty())
|
||||||
|
Ini.SysEmulationDirPath.SetValue(Emu.GetEmulatorPath());
|
||||||
|
LOG_NOTICE(GENERAL, "EmualtionDir: Custom EmulationDir is On, Binded $(EmulatorDir) to %s.", Ini.SysEmulationDirPath.GetValue());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_NOTICE(GENERAL, "EmualtionDir: Custom EmulationDir is Off, Binded $(EmulatorDir) to %s.", Emu.GetEmulatorPath());
|
||||||
|
}
|
||||||
for(int i=0; i<count; ++i)
|
for(int i=0; i<count; ++i)
|
||||||
{
|
{
|
||||||
IniEntry<std::string> entry_path;
|
IniEntry<std::string> entry_path;
|
||||||
|
|||||||
@@ -403,6 +403,7 @@ public:
|
|||||||
|
|
||||||
// Customed EmulationDir
|
// Customed EmulationDir
|
||||||
SysEmulationDirPath.Save();
|
SysEmulationDirPath.Save();
|
||||||
|
SysEmulationDirPathEnable.Save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user