aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/NSMem.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/NSMem.h')
-rw-r--r--NorthstarDedicatedTest/NSMem.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/NorthstarDedicatedTest/NSMem.h b/NorthstarDedicatedTest/NSMem.h
index 74df3a84..84bb93db 100644
--- a/NorthstarDedicatedTest/NSMem.h
+++ b/NorthstarDedicatedTest/NSMem.h
@@ -182,25 +182,7 @@ struct KHook
if (!targetFuncAddr)
return false;
- return MH_CreateHook(targetFuncAddr, hookFunc, original) == MH_OK;
- }
-
- // Returns true if succeeded
- static bool InitAllHooks()
- {
- for (KHook* hook : _allHooks)
- {
- if (hook->Setup())
- {
- spdlog::info("KHook hooked at {}", hook->targetFuncAddr);
- }
- else
- {
- return false;
- }
- }
-
- return MH_EnableHook(MH_ALL_HOOKS) == MH_OK;
+ return (MH_CreateHook(targetFuncAddr, hookFunc, original) == MH_OK) && (MH_EnableHook(targetFuncAddr) == MH_OK);
}
};
#define KHOOK(name, funcPatternInfo, returnType, convention, args) \