-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: safetyhook compilation (localcc) Add call_hook and call_hook_unsafe helper wrappers for Safetyhook Add deprecation warning to polyhook_2 xmake file.
- Loading branch information
Showing
13 changed files
with
83 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include <Function/Function.hpp> | ||
|
||
#include <safetyhook.hpp> | ||
|
||
namespace RC::Helper::Hook | ||
{ | ||
template <typename> | ||
class call_hook; | ||
|
||
template <typename ReturnType, typename... Params> | ||
class call_hook<Function<ReturnType(Params...)>> | ||
{ | ||
public: | ||
ReturnType operator()(SafetyHookInline& hook, Params... args) | ||
{ | ||
return hook.call<ReturnType, Params...>(std::forward<Params>(args)...); | ||
} | ||
}; | ||
|
||
template <typename> | ||
class call_hook_unsafe; | ||
|
||
template <typename ReturnType, typename... Params> | ||
class call_hook_unsafe<Function<ReturnType(Params...)>> | ||
{ | ||
public: | ||
ReturnType operator()(SafetyHookInline& hook, Params... args) | ||
{ | ||
return hook.unsafe_call<ReturnType, Params...>(std::forward<Params>(args)...); | ||
} | ||
}; | ||
} // namespace RC::Helper::Hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Unreal
updated
from add764 to a85db6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package("safetyhook") | ||
add_urls("[email protected]:cursey/safetyhook.git") | ||
add_urls("https://github.com/cursey/safetyhook.git") | ||
|
||
add_versions("v0.4.1", "629558c64009a7291ba6ed5cfb49187086a27a47") | ||
|
||
add_deps("cmake", "zydis") | ||
|
||
on_install(function (package) | ||
local configs = {} | ||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) | ||
table.insert(configs, "-DBUILD_SHARED_LIBS=OFF") | ||
import("package.tools.cmake").install(package, configs, { packagedeps = {"zydis", "zycore"} }) | ||
|
||
os.cp("include/*.hpp", package:installdir("include")) | ||
os.cp("include/safetyhook/*.hpp", package:installdir("include/safetyhook")) | ||
end) | ||
package_end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters