aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore/thread.cpp')
-rw-r--r--src/zencore/thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp
index d95f5d542..33056e4df 100644
--- a/src/zencore/thread.cpp
+++ b/src/zencore/thread.cpp
@@ -101,8 +101,9 @@ SetCurrentThreadName([[maybe_unused]] std::string_view ThreadName)
{
std::string ThreadNameZ{ThreadName};
const int ThreadId = GetCurrentThreadId();
-
+#if ZEN_WITH_TRACE
trace::ThreadRegister(ThreadNameZ.c_str(), /* system id */ ThreadId, /* sort id */ 0);
+#endif // ZEN_WITH_TRACE
#if ZEN_PLATFORM_WINDOWS
// The SetThreadDescription API works even if no debugger is attached.