aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/audio.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 00:40:53 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 00:40:53 +0100
commitf230156cbebc1b93db5e254410ee2ab3a8dcb27c (patch)
treee98c72fabbff37a55e7f9216c52e4f8ef2084073 /NorthstarDedicatedTest/audio.cpp
parent6c8112a6c368dd36d21fd94689e9682bc3b012a5 (diff)
downloadNorthstarLauncher-f230156cbebc1b93db5e254410ee2ab3a8dcb27c.tar.gz
NorthstarLauncher-f230156cbebc1b93db5e254410ee2ab3a8dcb27c.zip
use in-file macros rather than global funcs for registering dll load callbacks
Diffstat (limited to 'NorthstarDedicatedTest/audio.cpp')
-rw-r--r--NorthstarDedicatedTest/audio.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/audio.cpp b/NorthstarDedicatedTest/audio.cpp
index 0b65670f..982e42ab 100644
--- a/NorthstarDedicatedTest/audio.cpp
+++ b/NorthstarDedicatedTest/audio.cpp
@@ -1,4 +1,5 @@
#include "pch.h"
+#include "hooks.h"
#include "audio.h"
#include "dedicated.h"
@@ -493,7 +494,7 @@ void __fastcall MilesLog_Hook(int level, const char* string)
spdlog::info("[MSS] {} - {}", level, string);
}
-void InitialiseMilesAudioHooks(HMODULE baseAddress)
+ON_DLL_LOAD_CLIENT_RELIESON("client.dll", AudioHooks, ConVar, (HMODULE baseAddress)
{
Cvar_ns_print_played_sounds = new ConVar("ns_print_played_sounds", "0", FCVAR_NONE, "");
@@ -512,4 +513,4 @@ void InitialiseMilesAudioHooks(HMODULE baseAddress)
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x57DAD0, &MilesLog_Hook, reinterpret_cast<LPVOID*>(&MilesLog_Original));
MilesStopAll = (MilesStopAll_Type)((char*)baseAddress + 0x580850);
-} \ No newline at end of file
+}) \ No newline at end of file