From 5e65eecf8be743513918294f41b72a091e36dc76 Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Wed, 20 Nov 2019 20:49:22 +0100 Subject: [PATCH] Add method to call void function --- ScrapHacks/ScrapHack/Hook.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ScrapHacks/ScrapHack/Hook.h b/ScrapHacks/ScrapHack/Hook.h index c35eb02..01a9059 100644 --- a/ScrapHacks/ScrapHack/Hook.h +++ b/ScrapHacks/ScrapHack/Hook.h @@ -119,6 +119,15 @@ public: return this->orig; } + template + void func_void(Args... args) + { + disable(); + reinterpret_cast(this->orig)(args...); + enable(); + return; + } + template decltype(auto) func(Args... args) {