aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-23 02:32:39 -0700
committerChris Robinson <[email protected]>2023-05-23 02:32:39 -0700
commit7f72f83fcb3d463d4e5db5d393fff8606f0e2763 (patch)
tree76cd9a40b83bca44f2dc931857df4cd483862ec5 /alc
parent85c82693e89a76f17257a2ef8256ca22e5192289 (diff)
Use a string_view for handling debug messages
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp4
-rw-r--r--alc/context.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 3cad507e..88aa73c5 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2777,7 +2777,7 @@ ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context) noexcept
}
if(context->mContextFlags.test(ContextFlags::DebugBit)) UNLIKELY
- ctx->debugMessage(DebugSource::API, DebugType::Portability, 0, DebugSeverity::Medium, -1,
+ ctx->debugMessage(DebugSource::API, DebugType::Portability, 0, DebugSeverity::Medium,
"alcSuspendContext behavior is not portable -- some implementations suspend all "
"rendering, some only defer property changes, and some are completely no-op; consider "
"using alcDevicePauseSOFT to suspend all rendering, or alDeferUpdatesSOFT to only "
@@ -2800,7 +2800,7 @@ ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context) noexcept
}
if(context->mContextFlags.test(ContextFlags::DebugBit)) UNLIKELY
- ctx->debugMessage(DebugSource::API, DebugType::Portability, 0, DebugSeverity::Medium, -1,
+ ctx->debugMessage(DebugSource::API, DebugType::Portability, 0, DebugSeverity::Medium,
"alcProcessContext behavior is not portable -- some implementations resume rendering, "
"some apply deferred property changes, and some are completely no-op; consider using "
"alcDeviceResumeSOFT to resume rendering, or alProcessUpdatesSOFT to apply deferred "
diff --git a/alc/context.h b/alc/context.h
index 779be113..0611775a 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -191,15 +191,15 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
void setError(ALenum errorCode, const char *msg, ...);
void sendDebugMessage(std::unique_lock<std::mutex> &debuglock, DebugSource source,
- DebugType type, ALuint id, DebugSeverity severity, ALsizei length, const char *message);
+ DebugType type, ALuint id, DebugSeverity severity, std::string_view message);
void debugMessage(DebugSource source, DebugType type, ALuint id, DebugSeverity severity,
- ALsizei length, const char *message)
+ std::string_view message)
{
if(!mDebugEnabled.load(std::memory_order_relaxed)) LIKELY
return;
std::unique_lock<std::mutex> debuglock{mDebugCbLock};
- sendDebugMessage(debuglock, source, type, id, severity, length, message);
+ sendDebugMessage(debuglock, source, type, id, severity, message);
}
/* Process-wide current context */