From 023cb20ba9128d41fe17fcc24fb3bc069534583a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 17 Jun 2026 00:33:00 +0200 Subject: [PATCH] Only display wait reason or state if present. --- profiler/src/profiler/TracyView_Callstack.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/profiler/src/profiler/TracyView_Callstack.cpp b/profiler/src/profiler/TracyView_Callstack.cpp index 24cd5b8e..78c07c3b 100644 --- a/profiler/src/profiler/TracyView_Callstack.cpp +++ b/profiler/src/profiler/TracyView_Callstack.cpp @@ -219,12 +219,18 @@ void View::DrawCallstackTable( const CallstackFrameId* data, size_t size, uint64 { ImGui::BeginTooltip(); TextFocused( "Time:", TimeToString( wait.time ) ); - TextFocused( "Reason:", wait.reasonCode ); - ImGui::SameLine(); - TextDisabledUnformatted( wait.reason ); - TextFocused( "State:", wait.stateCode ); - ImGui::SameLine(); - TextDisabledUnformatted( wait.state ); + if( wait.reasonCode ) + { + TextFocused( "Reason:", wait.reasonCode ); + ImGui::SameLine(); + TextDisabledUnformatted( wait.reason ); + } + if( wait.stateCode ) + { + TextFocused( "State:", wait.stateCode ); + ImGui::SameLine(); + TextDisabledUnformatted( wait.state ); + } ImGui::EndTooltip(); } }