From a3947fbc570686e4c8881161a92ac565912a49c9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 22 Mar 2023 20:52:31 +0100 Subject: [PATCH] Use vStart retrieved from ctx. --- server/TracyView_ContextSwitch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView_ContextSwitch.cpp b/server/TracyView_ContextSwitch.cpp index 3e01f7d8..6477aa60 100644 --- a/server/TracyView_ContextSwitch.cpp +++ b/server/TracyView_ContextSwitch.cpp @@ -308,8 +308,8 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector< case ContextSwitchDrawType::Running: { const auto end = ev.IsEndValid() ? ev.End() : m_worker.GetLastTime(); - const auto px0 = std::max( { ( ev.Start() - m_vd.zvStart ) * pxns, -10.0, double( v.minpx ) } ); - const auto px1 = std::min( ( end - m_vd.zvStart ) * pxns, w + 10.0 ); + const auto px0 = std::max( { ( ev.Start() - vStart ) * pxns, -10.0, double( v.minpx ) } ); + const auto px1 = std::min( ( end - vStart ) * pxns, w + 10.0 ); DrawLine( draw, dpos + ImVec2( px0, offset + ty05 - 0.5f ), dpos + ImVec2( px1, offset + ty05 - 0.5f ), 0xFF22DD22, lineSize ); if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + ty + 1 ) ) ) {