aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/nsprefix.cpp
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-12-19 19:32:16 +0100
committerGitHub <noreply@github.com>2022-12-19 19:32:16 +0100
commite04f3b36accccb590a2d51b4829256b9964ac3fd (patch)
tree20ee30c82e6f53e6e772be2e1b9613eebca12bf3 /NorthstarDLL/nsprefix.cpp
parent33f18a735986dcd136bf8ba70ad8331306c28227 (diff)
downloadNorthstarLauncher-e04f3b36accccb590a2d51b4829256b9964ac3fd.tar.gz
NorthstarLauncher-e04f3b36accccb590a2d51b4829256b9964ac3fd.zip
Restructuring (#365)
* Remove launcher proxy * Restructuring * More restructuring * Fix include dirs * Fix merge * Remove clang thing * Filters * Oops
Diffstat (limited to 'NorthstarDLL/nsprefix.cpp')
-rw-r--r--NorthstarDLL/nsprefix.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/NorthstarDLL/nsprefix.cpp b/NorthstarDLL/nsprefix.cpp
deleted file mode 100644
index 8057865e..00000000
--- a/NorthstarDLL/nsprefix.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "pch.h"
-#include "nsprefix.h"
-#include "dedicated.h"
-#include <string>
-
-std::string GetNorthstarPrefix()
-{
- return NORTHSTAR_FOLDER_PREFIX;
-}
-
-void InitialiseNorthstarPrefix()
-{
- 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";
- }
-
- // set the console title to show the current profile
- // dont do this on dedi as title contains useful information on dedi and setting title breaks it as well
- if (!IsDedicatedServer())
- SetConsoleTitleA((std::string("NorthstarLauncher | ") + NORTHSTAR_FOLDER_PREFIX).c_str());
-}