mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 21:26:12 +00:00
Hook initialisation can't fail, because it's just a registration
* Hooking no longer does anything active immediately when initialised, it just registers a function to be hooked, which is then deferred and/or continually re-hooked depending on platform-specific functionality.
This commit is contained in:
@@ -44,11 +44,11 @@ public:
|
||||
~Hook() {}
|
||||
FuncType operator()() { return (FuncType)orig_funcptr; }
|
||||
void SetFuncPtr(void *ptr) { orig_funcptr = ptr; }
|
||||
bool Initialize(const char *function, const char *module_name, void *destination_function_ptr)
|
||||
void Initialize(const char *function, const char *module_name, void *destination_function_ptr)
|
||||
{
|
||||
orig_funcptr = Process::GetFunctionAddress(Process::LoadModule(module_name), function);
|
||||
|
||||
return Win32_IAT_Hook(&orig_funcptr, module_name, function, destination_function_ptr);
|
||||
Win32_IAT_Hook(&orig_funcptr, module_name, function, destination_function_ptr);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user