diff options
author | p0358 <p0358@users.noreply.github.com> | 2021-12-29 05:48:33 +0100 |
---|---|---|
committer | p0358 <p0358@users.noreply.github.com> | 2021-12-29 05:48:33 +0100 |
commit | 8a1a2e97624d15617197248a5e292c5ead5e74a2 (patch) | |
tree | d236b5bd3c21db674c784239beb2404273498887 /NorthstarDedicatedTest/dllmain.cpp | |
parent | 2bb9e5b29ab08062614b2d52c430f9097bf2106f (diff) | |
download | NorthstarLauncher-8a1a2e97624d15617197248a5e292c5ead5e74a2.tar.gz NorthstarLauncher-8a1a2e97624d15617197248a5e292c5ead5e74a2.zip |
add launcher.dll proxy option
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r-- | NorthstarDedicatedTest/dllmain.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp index 78edb297..80fc3ca4 100644 --- a/NorthstarDedicatedTest/dllmain.cpp +++ b/NorthstarDedicatedTest/dllmain.cpp @@ -43,9 +43,10 @@ BOOL APIENTRY DllMain( HMODULE hModule, break; } - if (!initialised) - InitialiseNorthstar(); - initialised = true; + // pls no xD + //if (!initialised) + // InitialiseNorthstar(); + //initialised = true; return TRUE; } @@ -53,7 +54,8 @@ BOOL APIENTRY DllMain( HMODULE hModule, void WaitForDebugger(HMODULE baseAddress) { // earlier waitfordebugger call than is in vanilla, just so we can debug stuff a little easier - if (CommandLine()->CheckParm("-waitfordebugger")) + //if (CommandLine()->CheckParm("-waitfordebugger")) + if (strstr(GetCommandLineA(), "-waitfordebugger")) { spdlog::info("waiting for debugger..."); spdlog::info("{} bytes have been statically allocated", g_iStaticAllocated); @@ -66,6 +68,13 @@ void WaitForDebugger(HMODULE baseAddress) // in the future this will be called from launcher instead of dllmain void InitialiseNorthstar() { + if (initialised) + { + fprintf(stderr, "[WARN] Called InitialiseNorthstar more than once!\n"); + return; + } + initialised = true; + InitialiseLogging(); // apply initial hooks @@ -73,7 +82,7 @@ void InitialiseNorthstar() InitialiseInterfaceCreationHooks(); // adding a callback to tier0 won't work for some reason - AddDllLoadCallback("launcher.dll", InitialiseTier0GameUtilFunctions); + AddDllLoadCallback("launcher.org.dll", InitialiseTier0GameUtilFunctions); AddDllLoadCallback("engine.dll", WaitForDebugger); AddDllLoadCallback("engine.dll", InitialiseEngineGameUtilFunctions); AddDllLoadCallback("server.dll", InitialiseServerGameUtilFunctions); @@ -82,7 +91,7 @@ void InitialiseNorthstar() // dedi patches { AddDllLoadCallback("engine.dll", InitialiseDedicated); - AddDllLoadCallback("launcher.dll", InitialiseDedicatedOrigin); + AddDllLoadCallback("launcher.org.dll", InitialiseDedicatedOrigin); AddDllLoadCallback("server.dll", InitialiseDedicatedServerGameDLL); AddDllLoadCallback("materialsystem_dx11.dll", InitialiseDedicatedMaterialSystem); // this fucking sucks, but seemingly we somehow load after rtech_game???? unsure how, but because of this we have to apply patches here, not on rtech_game load |