- files in local directories (saves & configs) now always have higher
priority than mods. Fixes #1685 and #1733 - fixed possible crash on exit in dispose() function - (vcmibuilder) fixes problem with partial mp3 -> ogg conversion
This commit is contained in:
1 parent
afcb7072eb
commit
d2ae847ecf
13 files changed
+97
-73
No files matched your search
@@ -59,11 +59,11 @@ void SettingsStorage::init()
|
||||
{
|
||||
std::string confName = "config/settings.json";
|
||||
|
||||
// Porbably new install. Create initial configuration
|
||||
if (!CResourceHandler::get()->existsResource(ResourceID(confName)))
|
||||
CResourceHandler::get()->createResource(confName);
|
||||
else
|
||||
JsonNode(ResourceID("config/settings.json")).swap(config);
|
||||
JsonUtils::assembleFromFiles(confName).swap(config);
|
||||
|
||||
// Probably new install. Create config file to save settings to
|
||||
if (!CResourceHandler::get("local")->existsResource(ResourceID(confName)))
|
||||
CResourceHandler::get("local")->createResource(confName);
|
||||
|
||||
JsonUtils::maximize(config, "vcmi:settings");
|
||||
JsonUtils::validate(config, "vcmi:settings", "settings");
|
||||
@@ -294,4 +294,4 @@ void config::CConfigHandler::init()
|
||||
// Force instantiation of the SettingsStorage::NodeAccessor class template.
|
||||
// That way method definitions can sit in the cpp file
|
||||
template struct SettingsStorage::NodeAccessor<SettingsListener>;
|
||||
template struct SettingsStorage::NodeAccessor<Settings>;
|
||||
template struct SettingsStorage::NodeAccessor<Settings>;
|
||||
Reference in new issue
Block a user