aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dllmain.cpp
diff options
context:
space:
mode:
authorp0358 <p0358@users.noreply.github.com>2021-12-30 06:26:10 +0100
committerp0358 <p0358@users.noreply.github.com>2021-12-30 06:26:10 +0100
commit4f7c3d02943a38941b79a638c5607b2b7f668956 (patch)
tree57cf52a0fcf5aaebedc7c8340a88038857c50174 /NorthstarDedicatedTest/dllmain.cpp
parentcec11fbdefa6e96cffd635fe0047de5245764cc9 (diff)
downloadNorthstarLauncher-4f7c3d02943a38941b79a638c5607b2b7f668956.tar.gz
NorthstarLauncher-4f7c3d02943a38941b79a638c5607b2b7f668956.zip
actually use custom allocation, override allocators of curl and rapidjson
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r--NorthstarDedicatedTest/dllmain.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp
index dfc3afe1..691c9bc7 100644
--- a/NorthstarDedicatedTest/dllmain.cpp
+++ b/NorthstarDedicatedTest/dllmain.cpp
@@ -65,7 +65,8 @@ void WaitForDebugger(HMODULE baseAddress)
}
}
-// in the future this will be called from launcher instead of dllmain
+SourceAllocator* g_SourceAllocator;
+
bool InitialiseNorthstar()
{
if (initialised)
@@ -81,6 +82,8 @@ bool InitialiseNorthstar()
InstallInitialHooks();
InitialiseInterfaceCreationHooks();
+ g_SourceAllocator = new SourceAllocator;
+
AddDllLoadCallback("tier0.dll", InitialiseTier0GameUtilFunctions);
AddDllLoadCallback("engine.dll", WaitForDebugger);
AddDllLoadCallback("engine.dll", InitialiseEngineGameUtilFunctions);
@@ -129,5 +132,9 @@ bool InitialiseNorthstar()
// mod manager after everything else
AddDllLoadCallback("engine.dll", InitialiseModManager);
+ // TODO: If you wanna make it more flexible and for example injectable with old Icepick injector
+ // in this place you should iterate over all already loaded DLLs and execute their callbacks and mark them as executed
+ // (as they will never get called otherwise and stuff will fail)
+
return true;
} \ No newline at end of file