mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 22:13:51 +00:00
Display program name in profiler window title.
This commit is contained in:
parent
cf07383db8
commit
7526ac83b5
@ -198,6 +198,7 @@ void View::Worker()
|
|||||||
m_frames.push_back( welcome.timeBegin * m_timerMul );
|
m_frames.push_back( welcome.timeBegin * m_timerMul );
|
||||||
m_delay = welcome.delay * m_timerMul;
|
m_delay = welcome.delay * m_timerMul;
|
||||||
m_resolution = welcome.resolution * m_timerMul;
|
m_resolution = welcome.resolution * m_timerMul;
|
||||||
|
m_programName = welcome.programName;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_hasData.store( true, std::memory_order_release );
|
m_hasData.store( true, std::memory_order_release );
|
||||||
@ -740,8 +741,11 @@ void View::DrawImpl()
|
|||||||
DrawConnection();
|
DrawConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char title[1024];
|
||||||
|
sprintf( title, "%s###Profiler", m_programName.c_str() );
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lock( m_lock );
|
std::lock_guard<std::mutex> lock( m_lock );
|
||||||
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
|
ImGui::Begin( title, nullptr, ImGuiWindowFlags_ShowBorders );
|
||||||
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
||||||
|
@ -152,6 +152,7 @@ private:
|
|||||||
uint64_t m_delay;
|
uint64_t m_delay;
|
||||||
uint64_t m_resolution;
|
uint64_t m_resolution;
|
||||||
double m_timerMul;
|
double m_timerMul;
|
||||||
|
std::string m_programName;
|
||||||
|
|
||||||
int8_t m_lastCpu;
|
int8_t m_lastCpu;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user