diff options
author | Emma Miler <27428383+emma-miler@users.noreply.github.com> | 2022-02-28 21:27:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 17:27:54 -0300 |
commit | 62e137b32ad7c601b2db37e69b9f435a7dbc730d (patch) | |
tree | a9477685c45fda66f5247323a816d28682cf48d5 /LauncherInjector | |
parent | e5bfd1259f8d991f85dddd509b71c3270dc43086 (diff) | |
download | NorthstarLauncher-62e137b32ad7c601b2db37e69b9f435a7dbc730d.tar.gz NorthstarLauncher-62e137b32ad7c601b2db37e69b9f435a7dbc730d.zip |
Autogenerate startup args text files (#99)
Adds `-nostartupargs`
Diffstat (limited to 'LauncherInjector')
-rw-r--r-- | LauncherInjector/main.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp index e62f83db..f262730d 100644 --- a/LauncherInjector/main.cpp +++ b/LauncherInjector/main.cpp @@ -312,6 +312,21 @@ int main(int argc, char* argv[]) { PrependPath(); + if (!fs::exists("ns_startup_args.txt")) + { + std::ofstream file("ns_startup_args.txt"); + std::string defaultArgs = "-multiple"; + file.write(defaultArgs.c_str(), defaultArgs.length()); + file.close(); + } + if (!fs::exists("ns_startup_args_dedi.txt")) + { + std::ofstream file("ns_startup_args_dedi.txt"); + std::string defaultArgs = "+setplaylist private_match"; + file.write(defaultArgs.c_str(), defaultArgs.length()); + file.close(); + } + printf("[*] Loading tier0.dll\n"); swprintf_s(buffer, L"%s\\bin\\x64_retail\\tier0.dll", exePath); hTier0Module = LoadLibraryExW(buffer, 0, LOAD_WITH_ALTERED_SEARCH_PATH); @@ -351,4 +366,4 @@ int main(int argc, char* argv[]) // auto result = ((signed __int64(__fastcall*)(__int64))LauncherMain)(0i64); return ((int(/*__fastcall*/*)(HINSTANCE, HINSTANCE, LPSTR, int))LauncherMain)( NULL, NULL, NULL, 0); // the parameters aren't really used anyways -}
\ No newline at end of file +} |