aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dllmain.cpp
diff options
context:
space:
mode:
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