mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
Fix Mod::addHook
This commit is contained in:
parent
56b7b66b93
commit
372e2aaeaa
1 changed files with 4 additions and 2 deletions
|
@ -233,17 +233,19 @@ namespace geode {
|
|||
* @param detour Pointer to your detour function
|
||||
* @param displayName Name of the hook that will be
|
||||
* displayed in the hook list
|
||||
* @param convention Calling convention of the hook
|
||||
* @param hookMetadata Metadata of the hook
|
||||
* @returns Successful result containing the
|
||||
* Hook pointer, errorful result with info on
|
||||
* error
|
||||
*/
|
||||
template <class Convention, class DetourType>
|
||||
template <class DetourType>
|
||||
Result<Hook*> addHook(
|
||||
void* address, DetourType detour, std::string const& displayName = "",
|
||||
tulip::hook::TulipConvention convention = tulip::hook::TulipConvention::Default,
|
||||
tulip::hook::HookMetadata const& hookMetadata = tulip::hook::HookMetadata()
|
||||
) {
|
||||
auto hook = Hook::create<Convention>(this, address, detour, displayName, hookMetadata);
|
||||
auto hook = Hook::create(this, address, detour, displayName, convention, hookMetadata);
|
||||
return this->addHook(hook);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue