diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/configurables.cpp | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/configurables.cpp')
-rw-r--r-- | NorthstarDedicatedTest/configurables.cpp | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/NorthstarDedicatedTest/configurables.cpp b/NorthstarDedicatedTest/configurables.cpp index 7096b2e9..e7dad8ca 100644 --- a/NorthstarDedicatedTest/configurables.cpp +++ b/NorthstarDedicatedTest/configurables.cpp @@ -2,31 +2,34 @@ #include "pch.h" #include "configurables.h" -std::string GetNorthstarPrefix() { - return NORTHSTAR_FOLDER_PREFIX; -} +std::string GetNorthstarPrefix() { return NORTHSTAR_FOLDER_PREFIX; } -void parseConfigurables() { - char* clachar = strstr(GetCommandLineA(), "-profile="); - if (clachar) { - std::string cla = std::string(clachar); - if (strncmp(cla.substr(9, 1).c_str(), "\"", 1)) { - int space = cla.find(" "); - std::string dirname = cla.substr(9, space - 9); - spdlog::info("Found profile in command line arguments: " + dirname); - NORTHSTAR_FOLDER_PREFIX = dirname; - } - else { - std::string quote = "\""; - int quote1 = cla.find(quote); - int quote2 = (cla.substr(quote1 + 1)).find(quote); - std::string dirname = cla.substr(quote1 + 1, quote2); - spdlog::info("Found profile in command line arguments: " + dirname); - NORTHSTAR_FOLDER_PREFIX = dirname; - } - } - else { - spdlog::info("Didnt' find profile in command line arguments. Using default: R2Northstar"); - NORTHSTAR_FOLDER_PREFIX = "R2Northstar"; - } +void parseConfigurables() +{ + char* clachar = strstr(GetCommandLineA(), "-profile="); + if (clachar) + { + std::string cla = std::string(clachar); + if (strncmp(cla.substr(9, 1).c_str(), "\"", 1)) + { + int space = cla.find(" "); + std::string dirname = cla.substr(9, space - 9); + spdlog::info("Found profile in command line arguments: " + dirname); + NORTHSTAR_FOLDER_PREFIX = dirname; + } + else + { + std::string quote = "\""; + int quote1 = cla.find(quote); + int quote2 = (cla.substr(quote1 + 1)).find(quote); + std::string dirname = cla.substr(quote1 + 1, quote2); + spdlog::info("Found profile in command line arguments: " + dirname); + NORTHSTAR_FOLDER_PREFIX = dirname; + } + } + else + { + spdlog::info("Didnt' find profile in command line arguments. Using default: R2Northstar"); + NORTHSTAR_FOLDER_PREFIX = "R2Northstar"; + } }
\ No newline at end of file |