diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 352ab5bd..3584615a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -209,6 +209,18 @@ void View::ViewSource( const char* fileName, int line, const char* functionName } } +void View::ViewSourceCheckKeyMod( const char* fileName, int line, const char* functionName ) +{ + if( ImGui::GetIO().KeyCtrl ) + { + ViewSource( fileName, line ); + } + else + { + ViewSource( fileName, line, functionName ); + } +} + void View::ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr ) { assert( fileName || symAddr ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 965d4cc8..c6482151 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -113,6 +113,7 @@ public: void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void ViewSource( const char* fileName, int line ); void ViewSource( const char* fileName, int line, const char* functionName ); + void ViewSourceCheckKeyMod( const char* fileName, int line, const char* functionName ); void ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr ); bool ViewDispatch( const char* fileName, int line, uint64_t symAddr );