aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dllmain.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 15:13:45 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 15:13:45 +0100
commita4434a4db16c347d5453354c1a15555d168ec7b9 (patch)
tree976188f0fef133c1f8fc7ebf757296b0ea848a7e /NorthstarDedicatedTest/dllmain.cpp
parente98fc31a93dfc9a14db7bb5510d25df0226d6fd3 (diff)
downloadNorthstarLauncher-a4434a4db16c347d5453354c1a15555d168ec7b9.tar.gz
NorthstarLauncher-a4434a4db16c347d5453354c1a15555d168ec7b9.zip
commandline struct change, dedicated refactor
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r--NorthstarDedicatedTest/dllmain.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp
index 3efe38c0..b801b281 100644
--- a/NorthstarDedicatedTest/dllmain.cpp
+++ b/NorthstarDedicatedTest/dllmain.cpp
@@ -43,6 +43,16 @@ BOOL APIENTRY DllMain( HMODULE hModule,
return TRUE;
}
+void WaitForDebugger(HMODULE baseAddress)
+{
+ // earlier waitfordebugger call than is in vanilla, just so we can debug stuff a little easier
+ if (CommandLine()->CheckParm("-waitfordebugger"))
+ {
+ while (!IsDebuggerPresent())
+ Sleep(100);
+ }
+}
+
// in the future this will be called from launcher instead of dllmain
void InitialiseNorthstar()
{
@@ -52,6 +62,7 @@ void InitialiseNorthstar()
InstallInitialHooks();
InitialiseInterfaceCreationHooks();
+ AddDllLoadCallback("engine.dll", WaitForDebugger);
AddDllLoadCallback("engine.dll", InitialiseEngineGameUtilFunctions);
// dedi patches