aboutsummaryrefslogtreecommitdiff
path: root/src/headless
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-09-09 16:00:23 +0200
committer Hop311 <hop3114@gmail.com>2023-09-09 22:50:29 +0200
commitb4220ad73e14e3b497b2fdeb83d76a6633664764 (patch)
tree72aee7b62ca2a1714799ff8f477ca1e50407eca8 /src/headless
parent7772f8871348b7b52cb0a478bb76df68d8799a07 (diff)
PR feedback + Logger::warning
Diffstat (limited to 'src/headless')
-rw-r--r--src/headless/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/headless/main.cpp b/src/headless/main.cpp
index 3185001..02eeb48 100644
--- a/src/headless/main.cpp
+++ b/src/headless/main.cpp
@@ -18,10 +18,11 @@ static char const* get_program_name(char const* name) {
return last_separator;
}
-static bool headless_load(std::vector<std::filesystem::path> const& roots) {
+static bool headless_load(Dataloader::path_vector_t const& roots) {
bool ret = true;
Logger::set_info_func([](std::string&& str) { std::cout << str; });
+ Logger::set_warning_func([](std::string&& str) { std::cerr << str; });
Logger::set_error_func([](std::string&& str) { std::cerr << str; });
GameManager game_manager { []() {
@@ -46,10 +47,10 @@ static bool headless_load(std::vector<std::filesystem::path> const& roots) {
}
int main(int argc, char const* argv[]) {
- std::vector<std::filesystem::path> roots;
+ Dataloader::path_vector_t roots;
if (argc < 2) {
// TODO - non-Windows default paths
- static const std::filesystem::path default_path = "C:/Program Files (x86)/Steam/steamapps/common/Victoria 2";
+ static const fs::path default_path = "C:/Program Files (x86)/Steam/steamapps/common/Victoria 2";
std::cout << "Usage: " << get_program_name(argc > 0 ? argv[0] : nullptr) << " <base defines dir> [[mod defines dir]+]\n"
<< "Requires defines path(s) as arguments, starting with the base defines and continuing with mods.\n"