mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Support custom names for memory plots.
This commit is contained in:
parent
5a6c8b4696
commit
97e17a8d49
@ -16073,12 +16073,21 @@ void View::DrawAllocList()
|
||||
|
||||
const char* View::GetPlotName( const PlotData* plot ) const
|
||||
{
|
||||
static char tmp[1024];
|
||||
switch( plot->type )
|
||||
{
|
||||
case PlotType::User:
|
||||
return m_worker.GetString( plot->name );
|
||||
case PlotType::Memory:
|
||||
if( plot->name == 0 )
|
||||
{
|
||||
return ICON_FA_MEMORY " Memory usage";
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( tmp, ICON_FA_MEMORY " %s", m_worker.GetString( plot->name ) );
|
||||
return tmp;
|
||||
}
|
||||
case PlotType::SysTime:
|
||||
return ICON_FA_TACHOMETER_ALT " CPU usage";
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user