1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 20:45:34 +00:00

Merge branch 'fix_6589' into 'master'

Add default value for `user-data` in openmw.cfg

Closes #6589

See merge request OpenMW/openmw!1632
This commit is contained in:
AnyOldName3 2022-03-13 18:51:34 +00:00
commit 696be1cc39
2 changed files with 7 additions and 3 deletions

View file

@ -27,7 +27,7 @@ namespace OpenMW
("data", bpo::value<Files::MaybeQuotedPathContainer>()->default_value(Files::MaybeQuotedPathContainer(), "data")
->multitoken()->composing(), "set data directories (later directories have higher priority)")
("data-local", bpo::value<Files::MaybeQuotedPathContainer::value_type>()->default_value(Files::MaybeQuotedPathContainer::value_type(), ""),
("data-local", bpo::value<Files::MaybeQuotedPath>()->default_value(Files::MaybeQuotedPath(), ""),
"set local data directory (highest priority)")
("fallback-archive", bpo::value<StringsVector>()->default_value(StringsVector(), "fallback-archive")

View file

@ -168,9 +168,13 @@ void ConfigurationManager::addExtraConfigDirs(std::stack<boost::filesystem::path
void ConfigurationManager::addCommonOptions(boost::program_options::options_description& description)
{
Files::MaybeQuotedPath defaultUserData;
static_cast<boost::filesystem::path&>(defaultUserData) = boost::filesystem::path("?userdata?");
description.add_options()
("config", bpo::value<Files::MaybeQuotedPathContainer>()->multitoken()->composing(), "additional config directories")
("user-data", bpo::value<Files::MaybeQuotedPath>(),
("config", bpo::value<Files::MaybeQuotedPathContainer>()->default_value(Files::MaybeQuotedPathContainer(), "")
->multitoken()->composing(), "additional config directories")
("user-data", bpo::value<Files::MaybeQuotedPath>()->default_value(defaultUserData, ""),
"set user data directory (used for saves, screenshots, etc)");
}