Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Pat Hartl
a7d7430b7c Use ternary, parse option as stf::filesystem::path
Some checks failed
Build / Build Linux (GCC x86_64) (push) Failing after 3s
Build / Build Android (Clang arm64-v8a) (push) Failing after 3s
Build / Build Apple (AppleClang macOS x86_64) (push) Has been cancelled
Build / Build Windows (MSVC x86_64) (push) Has been cancelled
Build / Build Apple (AppleClang iOS arm64) (push) Has been cancelled
Build / Build Apple (AppleClang macOS arm64) (push) Has been cancelled
2026-05-11 17:57:48 -05:00
Pat Hartl
7c3614cc62 Allow config path to be set via command line 2026-05-11 16:58:58 -05:00

View file

@ -671,6 +671,7 @@ int game_main(int argc, char* argv[]) {
("h,help", "Print usage")
("console", "Show the Windows console window for logs", cxxopts::value<bool>()->default_value("false")->implicit_value("true"))
("dvd", "Path to DVD image file", cxxopts::value<std::string>())
("config", "Path to the config directory", cxxopts::value<std::string>())
("backend", "Graphics API backend to use (auto, d3d12, metal, vulkan, null)", cxxopts::value<std::string>())
("cvar", "Override configuration variables without modifying config", cxxopts::value<std::vector<std::string>>());
@ -691,7 +692,7 @@ int game_main(int argc, char* argv[]) {
exit(1);
}
dusk::ConfigPath = calculate_config_path();
dusk::ConfigPath = parsed_arg_options.count("config") ? std::filesystem::path(parsed_arg_options["config"].as<std::string>()) : calculate_config_path();
const auto startupLogLevel = static_cast<AuroraLogLevel>(parsed_arg_options["log-level"].as<uint8_t>());
dusk::InitializeFileLogging(dusk::ConfigPath, startupLogLevel);