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 ) ) ) {