aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-27 01:01:55 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-27 01:01:55 +0100
commit22cfe175e12c68d62412ca662b300aa89e097b24 (patch)
tree650d45d0cb3754a8f940fcb9d656e1ec5e66d280
parent26d090e4ae6153d1f7b49f8776c2923345dd810f (diff)
downloadNorthstarLauncher-22cfe175e12c68d62412ca662b300aa89e097b24.tar.gz
NorthstarLauncher-22cfe175e12c68d62412ca662b300aa89e097b24.zip
improve some commandline arg stuff
-rw-r--r--LauncherInjector/main.cpp17
-rw-r--r--NorthstarDedicatedTest/dedicated.cpp4
2 files changed, 17 insertions, 4 deletions
diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp
index 597e72d3..8b136612 100644
--- a/LauncherInjector/main.cpp
+++ b/LauncherInjector/main.cpp
@@ -88,6 +88,15 @@ int main(int argc, char* argv[]) {
std::wstring args;
std::ifstream cmdlineArgFile;
+ args.append(L" ");
+ for (int i = 0; i < argc; i++)
+ {
+ std::string str = argv[i];
+
+ args.append(std::wstring(str.begin(), str.end()));
+ args.append(L" ");
+ }
+
if (!isdedi)
cmdlineArgFile = std::ifstream("ns_startup_args.txt");
else
@@ -103,9 +112,9 @@ int main(int argc, char* argv[]) {
args.append(std::wstring(str.begin(), str.end()));
}
- if (isdedi)
- // copy -dedicated into args if we have it in commandline args
- args.append(L" -dedicated");
+ //if (isdedi)
+ // // copy -dedicated into args if we have it in commandline args
+ // args.append(L" -dedicated");
STARTUPINFO startupInfo;
PROCESS_INFORMATION processInfo;
@@ -127,7 +136,7 @@ int main(int argc, char* argv[]) {
HANDLE hThread = CreateRemoteThread(processInfo.hProcess, NULL, NULL, pLoadLibraryW, lpLibName, NULL, NULL);
WaitForSingleObject(hThread, INFINITE);
- MessageBoxA(0, std::to_string(GetLastError()).c_str(), "", MB_OK);
+ //MessageBoxA(0, std::to_string(GetLastError()).c_str(), "", MB_OK);
CloseHandle(hThread);
diff --git a/NorthstarDedicatedTest/dedicated.cpp b/NorthstarDedicatedTest/dedicated.cpp
index 42ddb5e4..b48bcc62 100644
--- a/NorthstarDedicatedTest/dedicated.cpp
+++ b/NorthstarDedicatedTest/dedicated.cpp
@@ -239,6 +239,10 @@ typedef void(*Tier0_InitOriginType)();
Tier0_InitOriginType Tier0_InitOrigin;
void Tier0_InitOriginHook()
{
+ // disable origin on dedicated
+ // for any big ea lawyers, this can't be used to play the game without origin, game will throw a fit if you try to do anything without an origin id as a client
+ // for dedi it's fine though, game doesn't care if origin is disabled as long as there's only a server
+
if (!IsDedicated())
Tier0_InitOrigin();
}