mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
- 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:
@ -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