Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-10-19 02:06:41 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-10-19 02:06:41 +0300
commit11258fab735a07dcdd444d6c65a58534c0f717db (patch)
tree858af8422762c6d4fe25e6db930e28b80d2c880d
parent33e5e076292ec6993ac52d58024c6bda87fc7684 (diff)
Condense jump arrows, depending on max depth of jump graph.
-rw-r--r--server/TracySourceView.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp
index bd774901..74c3f402 100644
--- a/server/TracySourceView.cpp
+++ b/server/TracySourceView.cpp
@@ -230,7 +230,11 @@ constexpr float JumpArrowBase = 9;
float SourceView::CalcJumpSeparation( float scale )
{
- return round( JumpSeparationBase * scale );
+ float jsb = JumpSeparationBase;
+ if( m_maxJumpLevel > 45 ) jsb -= 3;
+ else if( m_maxJumpLevel > 30 ) jsb -= 2;
+ else if( m_maxJumpLevel > 15 ) jsb -= 1;
+ return round( jsb * scale );
}