Add option to enable/disable hook

This commit is contained in:
2024-04-16 01:27:48 +07:00
parent c895c275cf
commit 3c2609798b
3 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,10 @@ static const struct hook_symbol unity_kernel32_syms[] = {
void unity_hook_init(const struct unity_config *cfg, HINSTANCE self) {
assert(cfg != NULL);
if (!cfg->enable) {
return;
}
if (unity_hook_initted) {
return;
}