mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix possible wrong process name for pid 0.
This commit is contained in:
parent
19f8f9f101
commit
217a3781e6
@ -10668,7 +10668,7 @@ void View::DrawCpuDataWindow()
|
|||||||
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
||||||
const auto expand = ImGui::TreeNode( pidtxt );
|
const auto expand = ImGui::TreeNode( pidtxt );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( name );
|
ImGui::TextUnformatted( pid.first == 0 ? "???" : name );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
||||||
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user