aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dllmain.cpp
diff options
context:
space:
mode:
authorp0358 <p0358@users.noreply.github.com>2021-12-31 22:46:45 +0100
committerp0358 <p0358@users.noreply.github.com>2021-12-31 22:46:45 +0100
commit9b13df7bc6f4c09c3fdab27cd51fe76d30b756b8 (patch)
treed273fbc7942b46497f056fd9c68b8b21e6d19fee /NorthstarDedicatedTest/dllmain.cpp
parentdcba96bcc4b02639e859b0dcdc863391cb54684f (diff)
downloadNorthstarLauncher-9b13df7bc6f4c09c3fdab27cd51fe76d30b756b8.tar.gz
NorthstarLauncher-9b13df7bc6f4c09c3fdab27cd51fe76d30b756b8.zip
some post-merge changes combined with my local changes
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r--NorthstarDedicatedTest/dllmain.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp
index 81bae847..87fb4d5f 100644
--- a/NorthstarDedicatedTest/dllmain.cpp
+++ b/NorthstarDedicatedTest/dllmain.cpp
@@ -43,11 +43,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
break;
}
- // pls no xD
- //if (!initialised)
- // InitialiseNorthstar();
- //initialised = true;
-
return TRUE;
}
@@ -71,9 +66,10 @@ bool InitialiseNorthstar()
spdlog::warn("Called InitialiseNorthstar more than once!");
return false;
}
+
initialised = true;
- curl_global_init(CURL_GLOBAL_DEFAULT);
+ curl_global_init_mem(CURL_GLOBAL_DEFAULT, _malloc_base, _free_base, _realloc_base, _strdup_base, _calloc_base);
InitialiseLogging();
@@ -81,6 +77,7 @@ bool InitialiseNorthstar()
InstallInitialHooks();
InitialiseInterfaceCreationHooks();
+ AddDllLoadCallback("tier0.dll", InitialiseTier0GameUtilFunctions);
AddDllLoadCallback("engine.dll", WaitForDebugger);
AddDllLoadCallback("engine.dll", InitialiseEngineGameUtilFunctions);
AddDllLoadCallback("server.dll", InitialiseServerGameUtilFunctions);
@@ -88,7 +85,7 @@ bool InitialiseNorthstar()
// dedi patches
{
- AddDllLoadCallback("launcher.dll", InitialiseDedicatedOrigin);
+ AddDllLoadCallback("tier0.dll", InitialiseDedicatedOrigin);
AddDllLoadCallback("engine.dll", InitialiseDedicated);
AddDllLoadCallback("server.dll", InitialiseDedicatedServerGameDLL);
AddDllLoadCallback("materialsystem_dx11.dll", InitialiseDedicatedMaterialSystem);
@@ -128,9 +125,8 @@ 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)
+ // run callbacks for any libraries that are already loaded by now
+ CallAllPendingDLLLoadCallbacks();
return true;
} \ No newline at end of file