mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +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
|
const char* View::GetPlotName( const PlotData* plot ) const
|
||||||
{
|
{
|
||||||
|
static char tmp[1024];
|
||||||
switch( plot->type )
|
switch( plot->type )
|
||||||
{
|
{
|
||||||
case PlotType::User:
|
case PlotType::User:
|
||||||
return m_worker.GetString( plot->name );
|
return m_worker.GetString( plot->name );
|
||||||
case PlotType::Memory:
|
case PlotType::Memory:
|
||||||
return ICON_FA_MEMORY " Memory usage";
|
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:
|
case PlotType::SysTime:
|
||||||
return ICON_FA_TACHOMETER_ALT " CPU usage";
|
return ICON_FA_TACHOMETER_ALT " CPU usage";
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user