1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Add default value for user-data in openmw.cfg

This commit is contained in:
Petr Mikheev 2022-02-06 21:07:14 +01:00
parent 7f4d4c0d70
commit ac5cd6c80a
2 changed files with 5 additions and 2 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,12 @@ 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>(),
("user-data", bpo::value<Files::MaybeQuotedPath>()->default_value(defaultUserData, ""),
"set user data directory (used for saves, screenshots, etc)");
}