Don't call CheckImplicitThread when GL hook is disabled

This commit is contained in:
Camille Martel
2020-05-28 15:12:03 -07:00
committed by Baldur Karlsson
parent 7a821c20bd
commit 0f7875a224
+14 -8
View File
@@ -87,18 +87,24 @@ int ScopedPrinter::depth = 0;
// This checks that we're not infinite looping by calling our own hooks from ourselves. Mostly
// useful on android where you can only debug by printf and the stack dumps are often corrupted when
// the callstack overflows.
#define SCOPED_GLCALL(funcname) \
SCOPED_LOCK(glLock); \
gl_CurChunk = GLChunk::funcname; \
glhook.driver->CheckImplicitThread(); \
#define SCOPED_GLCALL(funcname) \
SCOPED_LOCK(glLock); \
gl_CurChunk = GLChunk::funcname; \
if(glhook.enabled) \
{ \
glhook.driver->CheckImplicitThread(); \
} \
ScopedPrinter CONCAT(scopedprint, __LINE__)(STRINGIZE(funcname));
#else
#define SCOPED_GLCALL(funcname) \
SCOPED_LOCK(glLock); \
gl_CurChunk = GLChunk::funcname; \
glhook.driver->CheckImplicitThread();
#define SCOPED_GLCALL(funcname) \
SCOPED_LOCK(glLock); \
gl_CurChunk = GLChunk::funcname; \
if(glhook.enabled) \
{ \
glhook.driver->CheckImplicitThread(); \
}
#endif