aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-04-30 13:21:16 -0700
committerChris Robinson <[email protected]>2023-04-30 13:21:16 -0700
commitd4be95c90336f676c7463e392ffdd48e6c7d00a6 (patch)
treeac0a87b88f95eff16fe03d2ffe60296822b8426f /al
parentb64b500c6b75aebb3b5d1c41206317f81636a21c (diff)
Fix debug message control logic
A flag set being in mDebugFilters is considered disabled, not enabled.
Diffstat (limited to 'al')
-rw-r--r--al/debug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/al/debug.cpp b/al/debug.cpp
index 98c5a0b5..81e9b35f 100644
--- a/al/debug.cpp
+++ b/al/debug.cpp
@@ -171,9 +171,9 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlSOFT(ALenum source, ALenum typ
{
auto iter = std::lower_bound(context->mDebugFilters.cbegin(),
context->mDebugFilters.cend(), filter);
- if(enable && (iter == context->mDebugFilters.cend() || *iter != filter))
+ if(!enable && (iter == context->mDebugFilters.cend() || *iter != filter))
context->mDebugFilters.insert(iter, filter);
- else if(!enable && iter != context->mDebugFilters.cend() && *iter == filter)
+ else if(enable && iter != context->mDebugFilters.cend() && *iter == filter)
context->mDebugFilters.erase(iter);
};
auto apply_severity = [apply_filter,svrIndices](const uint filter)