|
|
@ -315,7 +315,7 @@ void OMW::Engine::go()
|
|
|
|
boost::filesystem::create_directories(configPath);
|
|
|
|
boost::filesystem::create_directories(configPath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Create the settings manager and load default and user settings file
|
|
|
|
// Create the settings manager and load default settings file
|
|
|
|
Settings::Manager settings;
|
|
|
|
Settings::Manager settings;
|
|
|
|
const std::string localdefault = mCfgMgr.getLocalPath().string() + "/settings-default.cfg";
|
|
|
|
const std::string localdefault = mCfgMgr.getLocalPath().string() + "/settings-default.cfg";
|
|
|
|
const std::string globaldefault = mCfgMgr.getGlobalPath().string() + "/settings-default.cfg";
|
|
|
|
const std::string globaldefault = mCfgMgr.getGlobalPath().string() + "/settings-default.cfg";
|
|
|
@ -326,11 +326,14 @@ void OMW::Engine::go()
|
|
|
|
else if (boost::filesystem::exists(globaldefault))
|
|
|
|
else if (boost::filesystem::exists(globaldefault))
|
|
|
|
settings.loadDefault(globaldefault);
|
|
|
|
settings.loadDefault(globaldefault);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// load user settings if they exist, otherwise just load the default settings as user settings
|
|
|
|
const std::string settingspath = mCfgMgr.getUserPath().string() + "/settings.cfg";
|
|
|
|
const std::string settingspath = mCfgMgr.getUserPath().string() + "/settings.cfg";
|
|
|
|
if (boost::filesystem::exists(settingspath))
|
|
|
|
if (boost::filesystem::exists(settingspath))
|
|
|
|
settings.loadUser(settingspath);
|
|
|
|
settings.loadUser(settingspath);
|
|
|
|
else
|
|
|
|
else if (boost::filesystem::exists(localdefault))
|
|
|
|
settings.copyDefaultToUserSettings();
|
|
|
|
settings.loadUser(localdefault);
|
|
|
|
|
|
|
|
else if (boost::filesystem::exists(globaldefault))
|
|
|
|
|
|
|
|
settings.loadUser(globaldefault);
|
|
|
|
|
|
|
|
|
|
|
|
mOgre->configure(!boost::filesystem::is_regular_file(mCfgMgr.getOgreConfigPath()),
|
|
|
|
mOgre->configure(!boost::filesystem::is_regular_file(mCfgMgr.getOgreConfigPath()),
|
|
|
|
mCfgMgr.getOgreConfigPath().string(),
|
|
|
|
mCfgMgr.getOgreConfigPath().string(),
|
|
|
|