From 8762bc418658e931b382760aac7144e30cd8549c Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 26 Mar 2019 11:52:49 +0000 Subject: [PATCH] When an alias hook is fetched, return precisely the alias entry point * This doesn't change much except for setting gl_CurChunk more accurately for alias functions. --- renderdoc/driver/gl/gl_hooks.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renderdoc/driver/gl/gl_hooks.cpp b/renderdoc/driver/gl/gl_hooks.cpp index bc70f5daf..ba334223f 100644 --- a/renderdoc/driver/gl/gl_hooks.cpp +++ b/renderdoc/driver/gl/gl_hooks.cpp @@ -145,12 +145,12 @@ bool FullyImplementedFunction(const char *funcname) void *HookedGetProcAddress(const char *func, void *realFunc) { -#define CheckFunction(function, name) \ - if(!strcmp(func, STRINGIZE(name))) \ - { \ - if(GL.function == NULL) \ - GL.function = (decltype(GL.function))realFunc; \ - return (void *)&CONCAT(function, _renderdoc_hooked); \ +#define CheckFunction(function, aliasName) \ + if(!strcmp(func, STRINGIZE(aliasName))) \ + { \ + if(GL.function == NULL) \ + GL.function = (decltype(GL.function))realFunc; \ + return (void *)&CONCAT(aliasName, _renderdoc_hooked); \ } #define CheckUnsupported(function) \