Display threads that have acquired a lock.

This commit is contained in:
Bartosz Taudul 2017-10-26 00:42:16 +02:00
parent 874d8287c4
commit db48cd6c1f

View File

@ -2474,6 +2474,18 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
char buf[1024];
sprintf( buf, "%" PRIu64 ": %s", v.first, GetString( srcloc.function ) );
draw->AddText( wpos + ImVec2( 0, offset ), 0xFF8888FF, buf );
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, offset ), wpos + ImVec2( ty + ImGui::CalcTextSize( buf ).x, offset + ty ) ) )
{
ImGui::BeginTooltip();
ImGui::Text( "Thread list:" );
ImGui::Indent( ty );
for( auto& t : v.second.threadList )
{
ImGui::Text( "%s", GetThreadString( t ) );
}
ImGui::Unindent( ty );
ImGui::EndTooltip();
}
cnt++;
}
}