aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/configurables.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-07 21:31:41 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-07 21:31:41 +0100
commit2ae34b67e36b8ba05132d481876eb4ed7a826283 (patch)
tree63f44c8e2dcdc959d7a5317a3a7b36efedbd7d38 /NorthstarDLL/configurables.cpp
parent3406de7aaaf52cbef20b1549f2d7da0255d30f51 (diff)
downloadNorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.tar.gz
NorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.zip
almost fully replaced hooking lib
Diffstat (limited to 'NorthstarDLL/configurables.cpp')
-rw-r--r--NorthstarDLL/configurables.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/NorthstarDLL/configurables.cpp b/NorthstarDLL/configurables.cpp
index 389e6e0b..2488515c 100644
--- a/NorthstarDLL/configurables.cpp
+++ b/NorthstarDLL/configurables.cpp
@@ -1,38 +1,38 @@
-#include <string>
-#include "pch.h"
-#include "configurables.h"
-
-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("Profile was not found in command line arguments. Using default: R2Northstar");
- NORTHSTAR_FOLDER_PREFIX = "R2Northstar";
- }
-}
+#include <string>
+#include "pch.h"
+#include "configurables.h"
+
+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("Profile was not found in command line arguments. Using default: R2Northstar");
+ NORTHSTAR_FOLDER_PREFIX = "R2Northstar";
+ }
+}