aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-01 19:11:26 -0700
committerChris Robinson <[email protected]>2023-05-01 19:11:26 -0700
commite1b573284b649c6fef42ab5b6ca51978c4a1329a (patch)
tree2bd2c30bebf142c969560a069417ceba57d4a953 /alc/context.h
parentbb08a416f1b0e31292b896f2f8845e365daee6b1 (diff)
Implement pushing/popping debug groups
Diffstat (limited to 'alc/context.h')
-rw-r--r--alc/context.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/alc/context.h b/alc/context.h
index 3e31c9b8..8757b041 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -166,15 +166,16 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
#endif
void setError(ALenum errorCode, const char *msg, ...);
- void sendDebugMessage(DebugSource source, DebugType type, ALuint id, DebugSeverity severity,
- ALsizei length, const char *message);
+ void sendDebugMessage(std::unique_lock<std::mutex> &debuglock, DebugSource source,
+ DebugType type, ALuint id, DebugSeverity severity, ALsizei length, const char *message);
void debugMessage(DebugSource source, DebugType type, ALuint id, DebugSeverity severity,
ALsizei length, const char *message)
{
if(!mDebugEnabled.load(std::memory_order_relaxed)) LIKELY
return;
- sendDebugMessage(source, type, id, severity, length, message);
+ std::unique_lock<std::mutex> debuglock{mDebugCbLock};
+ sendDebugMessage(debuglock, source, type, id, severity, length, message);
}
/* Process-wide current context */