aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/gameutils.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/gameutils.cpp
parentdcba96bcc4b02639e859b0dcdc863391cb54684f (diff)
downloadNorthstarLauncher-9b13df7bc6f4c09c3fdab27cd51fe76d30b756b8.tar.gz
NorthstarLauncher-9b13df7bc6f4c09c3fdab27cd51fe76d30b756b8.zip
some post-merge changes combined with my local changes
Diffstat (limited to 'NorthstarDedicatedTest/gameutils.cpp')
-rw-r--r--NorthstarDedicatedTest/gameutils.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/gameutils.cpp b/NorthstarDedicatedTest/gameutils.cpp
index b2c88e49..1cbd8648 100644
--- a/NorthstarDedicatedTest/gameutils.cpp
+++ b/NorthstarDedicatedTest/gameutils.cpp
@@ -78,6 +78,13 @@ void InitialiseServerGameUtilFunctions(HMODULE baseAddress)
void InitialiseTier0GameUtilFunctions(HMODULE baseAddress)
{
+ if (!baseAddress)
+ {
+ spdlog::critical("tier0 base address is null, but it should be already loaded");
+ throw "tier0 base address is null, but it should be already loaded";
+ }
+ if (g_pMemAllocSingleton)
+ return; // seems this function was already called
CreateGlobalMemAlloc = reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(baseAddress, "CreateGlobalMemAlloc"));
IMemAlloc** ppMemAllocSingleton = reinterpret_cast<IMemAlloc**>(GetProcAddress(baseAddress, "g_pMemAllocSingleton"));
if (!ppMemAllocSingleton)
@@ -89,7 +96,7 @@ void InitialiseTier0GameUtilFunctions(HMODULE baseAddress)
{
g_pMemAllocSingleton = CreateGlobalMemAlloc();
*ppMemAllocSingleton = g_pMemAllocSingleton;
- spdlog::warn("Created new g_pMemAllocSingleton");
+ spdlog::info("Created new g_pMemAllocSingleton");
}
else
{