mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Fix missing egl functions in eglGetProcAddress, use hook set macro
This commit is contained in:
@@ -425,21 +425,12 @@ eglGetProcAddress_renderdoc_hooked(const char *func)
|
||||
if(realFunc == NULL)
|
||||
return realFunc;
|
||||
|
||||
// return our egl hooks
|
||||
if(!strcmp(func, "eglCreateContext"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglCreateContext_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglGetDisplay"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglGetDisplay_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglDestroyContext"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglDestroyContext_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglMakeCurrent"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglMakeCurrent_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglSwapBuffers"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglSwapBuffers_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglPostSubBufferNV"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglPostSubBufferNV_renderdoc_hooked;
|
||||
if(!strcmp(func, "eglGetProcAddress"))
|
||||
return (__eglMustCastToProperFunctionPointerType)&eglGetProcAddress_renderdoc_hooked;
|
||||
// return our egl hooks
|
||||
#define GPA_FUNCTION(name) \
|
||||
if(!strcmp(func, "egl" STRINGIZE(name))) \
|
||||
return (__eglMustCastToProperFunctionPointerType)&CONCAT(egl, CONCAT(name, _renderdoc_hooked)); \
|
||||
EGL_HOOKED_SYMBOLS(GPA_FUNCTION)
|
||||
#undef GPA_FUNCTION
|
||||
|
||||
// any other egl functions are safe to pass through unchanged
|
||||
if(!strncmp(func, "egl", 3))
|
||||
|
||||
Reference in New Issue
Block a user