diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 8d2eb960..014d6f2f 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -386,6 +386,19 @@ const char* View::TimeToString( uint64_t ns ) const return buf; } +const char* View::GetString( uint64_t ptr ) const +{ + const auto it = m_strings.find( ptr ); + if( it == m_strings.end() ) + { + return "???"; + } + else + { + return it->second.c_str(); + } +} + void View::Draw() { s_instance->DrawImpl(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 63bfa9af..22ad7cdd 100755 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -53,6 +53,7 @@ private: uint64_t GetFrameEnd( size_t idx ) const; uint64_t GetLastTime() const; const char* TimeToString( uint64_t ns ) const; + const char* GetString( uint64_t ptr ) const; void DrawImpl(); void DrawFrames();