mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Use common functionality to get frame set name.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "TracyColor.hpp"
|
||||
#include "TracyPrint.hpp"
|
||||
#include "TracyView.hpp"
|
||||
@@ -791,11 +793,32 @@ const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( buf, "%s %s (%s)", m_worker.GetString( fd.name ), RealToString( fnum ), TimeToString( ftime ) );
|
||||
sprintf( buf, "%s %s (%s)", GetFrameSetName( fd ), RealToString( fnum ), TimeToString( ftime ) );
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
const char* View::GetFrameSetName( const FrameData& fd ) const
|
||||
{
|
||||
return GetFrameSetName( fd, m_worker );
|
||||
}
|
||||
|
||||
const char* View::GetFrameSetName( const FrameData& fd, const Worker& worker )
|
||||
{
|
||||
enum { Pool = 4 };
|
||||
static char bufpool[Pool][64];
|
||||
static int bufsel = 0;
|
||||
|
||||
if( fd.name == 0 )
|
||||
{
|
||||
return "Frames";
|
||||
}
|
||||
else
|
||||
{
|
||||
return worker.GetString( fd.name );
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::ShortenNamespace( const char* name ) const
|
||||
{
|
||||
if( m_namespace == Namespace::Full ) return name;
|
||||
|
||||
Reference in New Issue
Block a user