diff --git a/GlosSITarget/Settings.h b/GlosSITarget/Settings.h index 374b93a..a446f8a 100644 --- a/GlosSITarget/Settings.h +++ b/GlosSITarget/Settings.h @@ -126,20 +126,19 @@ inline void Parse(const std::vector& args) if (arg.empty()) { continue; } - if (arg[0] != L'-') { - configName = std::wstring(arg.begin(), arg.end()); - } - if (arg[0] == L'-') { - if (arg == L"-disableuwpoverlay") { - cli.no_uwp_overlay = true; - } - if (arg == L"-disablewatchdog") { - cli.disable_watchdog = true; - } + if (arg == L"-disableuwpoverlay") { + cli.no_uwp_overlay = true; + } else if (arg == L"-disablewatchdog") { + cli.disable_watchdog = true; + } else { + configName += L" " + std::wstring(arg.begin(), arg.end()); } + } - if (!configName.empty()) { + if (configName[0] == L' ') { + configName.erase(configName.begin()); + } if (!configName.ends_with(L".json")) { configName += L".json"; }