Added support for global settings1-9.conf to allow easier scripted reconfiguration.

This commit is contained in:
Pieter Hulshoff 2019-10-30 21:12:51 +01:00
parent d7ee7ac852
commit a762d3c07f
2 changed files with 7 additions and 4 deletions

View File

@ -122,10 +122,13 @@ bool ImportConfiguration(Configuration *c)
DIR *dp;
struct dirent *dirp;
std::string settingsConfPath = Utils::combinePath(configPath, "settings.conf");
if(!c->import("", settingsConfPath))
std::string settingsConfPath = Utils::combinePath(configPath, "settings");
c->import("", "", settingsConfPath + "_saved.conf", false);
for ( int i = 9; i > 0; i--)
c->import("", "", settingsConfPath + std::to_string(i) + ".conf", false);
if(!c->import("", settingsConfPath + ".conf"))
{
Logger::write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + settingsConfPath + "\"");
Logger::write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + settingsConfPath + ".conf\"");
return false;
}

View File

@ -21,7 +21,7 @@
std::string retrofe_version_major = "0";
std::string retrofe_version_minor = "9";
std::string retrofe_version_build = "8";
std::string retrofe_version_build = "9";
std::string Version::getString( )