From 7ed1c4ffb116545def6868fb9964eca9d415d8db Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 2 Jul 2022 13:43:46 +0200 Subject: [PATCH] More navigation extraction. --- server/TracyView.cpp | 19 ------------------- server/TracyView_Navigation.cpp | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index f5eb9492..4766277e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -14272,25 +14272,6 @@ void View::DrawCallstackCalls( uint32_t callstack, uint16_t limit ) const } } -void View::SetViewToLastFrames() -{ - const int total = m_worker.GetFrameCount( *m_frames ); - - m_vd.zvStart = m_worker.GetFrameBegin( *m_frames, std::max( 0, total - 4 ) ); - if( total == 1 ) - { - m_vd.zvEnd = m_worker.GetLastTime(); - } - else - { - m_vd.zvEnd = m_worker.GetFrameBegin( *m_frames, total - 1 ); - } - if( m_vd.zvEnd == m_vd.zvStart ) - { - m_vd.zvEnd = m_worker.GetLastTime(); - } -} - void View::DrawSourceTooltip( const char* filename, uint32_t srcline, int before, int after, bool separateTooltip ) { if( !filename ) return; diff --git a/server/TracyView_Navigation.cpp b/server/TracyView_Navigation.cpp index a0c0a3e9..75f5eaea 100644 --- a/server/TracyView_Navigation.cpp +++ b/server/TracyView_Navigation.cpp @@ -130,4 +130,23 @@ void View::CenterAtTime( int64_t t ) ZoomToRange( t - hr, t + hr ); } +void View::SetViewToLastFrames() +{ + const int total = m_worker.GetFrameCount( *m_frames ); + + m_vd.zvStart = m_worker.GetFrameBegin( *m_frames, std::max( 0, total - 4 ) ); + if( total == 1 ) + { + m_vd.zvEnd = m_worker.GetLastTime(); + } + else + { + m_vd.zvEnd = m_worker.GetFrameBegin( *m_frames, total - 1 ); + } + if( m_vd.zvEnd == m_vd.zvStart ) + { + m_vd.zvEnd = m_worker.GetLastTime(); + } +} + }