aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/hookutils.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-17 22:33:00 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-17 22:33:00 +0100
commitca5db71e8215a6c5660fe03088a6d7349f55f817 (patch)
tree534b79d2599475b1da3edb4f232223d9e32d3174 /NorthstarDedicatedTest/hookutils.cpp
parent51d3d4a40c8579e29571bc80d35bbb62fa50661b (diff)
downloadNorthstarLauncher-ca5db71e8215a6c5660fe03088a6d7349f55f817.tar.gz
NorthstarLauncher-ca5db71e8215a6c5660fe03088a6d7349f55f817.zip
add support for custom convars and concommands
Diffstat (limited to 'NorthstarDedicatedTest/hookutils.cpp')
-rw-r--r--NorthstarDedicatedTest/hookutils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/hookutils.cpp b/NorthstarDedicatedTest/hookutils.cpp
index c5472b57..9fa45602 100644
--- a/NorthstarDedicatedTest/hookutils.cpp
+++ b/NorthstarDedicatedTest/hookutils.cpp
@@ -23,6 +23,11 @@ TempReadWrite::~TempReadWrite()
void HookEnabler::CreateHook(LPVOID ppTarget, LPVOID ppDetour, LPVOID* ppOriginal, const char* targetName)
{
+ // the macro for this uses ppTarget's name as targetName, and this typically starts with &
+ // targetname is used for debug stuff and debug output is nicer if we don't have this
+ if (*targetName == '&')
+ targetName++;
+
if (MH_CreateHook(ppTarget, ppDetour, ppOriginal) == MH_OK)
{
HookTarget *target = new HookTarget;