mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-15 22:40:50 +00:00
Fixes for replay, and populating hooks (call through hooked func)
This commit is contained in:
@@ -592,6 +592,9 @@ class OpenGLHook : LibraryHook
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
if(wglGetProcAddress_hook() == NULL)
|
||||
wglGetProcAddress_hook.SetFuncPtr(Process::GetFunctionAddress(DLL_NAME, "wglGetProcAddress"));
|
||||
|
||||
wglGetProcAddress_hooked("wglCreateContextAttribsARB");
|
||||
|
||||
#undef HookInit
|
||||
@@ -599,7 +602,7 @@ class OpenGLHook : LibraryHook
|
||||
|
||||
// cheeky
|
||||
#undef HookExtension
|
||||
#define HookExtension(funcPtrType, function) wglGetProcAddress_hook()(STRINGIZE(function))
|
||||
#define HookExtension(funcPtrType, function) wglGetProcAddress_hooked(STRINGIZE(function))
|
||||
#undef HookExtensionAlias
|
||||
#define HookExtensionAlias(funcPtrType, function, alias)
|
||||
|
||||
|
||||
@@ -54,6 +54,11 @@ class Hook
|
||||
return (FuncType)orig_funcptr;
|
||||
}
|
||||
|
||||
void SetFuncPtr(void *ptr)
|
||||
{
|
||||
orig_funcptr = ptr;
|
||||
}
|
||||
|
||||
bool Initialize(const char *function, const char *module_name, void *destination_function_ptr)
|
||||
{
|
||||
orig_funcptr = Process::GetFunctionAddress(module_name, function);
|
||||
|
||||
Reference in New Issue
Block a user