mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Display list of broadcasting clients.
This commit is contained in:
parent
36989da2c6
commit
67daff1452
@ -26,6 +26,7 @@
|
||||
#define STBI_ONLY_PNG
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "../../common/TracyProtocol.hpp"
|
||||
#include "../../server/tracy_flat_hash_map.hpp"
|
||||
#include "../../server/tracy_pdqsort.h"
|
||||
#include "../../server/TracyBadVersion.hpp"
|
||||
@ -458,6 +459,33 @@ int main( int argc, char** argv )
|
||||
tracy::BadVersion( badVer );
|
||||
}
|
||||
|
||||
if( !clients.empty() )
|
||||
{
|
||||
ImGui::Separator();
|
||||
ImGui::TextUnformatted( "Available clients:" );
|
||||
ImGui::Separator();
|
||||
ImGui::Columns( 2 );
|
||||
for( auto& v : clients )
|
||||
{
|
||||
const bool badProto = v.second.protocolVersion != tracy::ProtocolVersion;
|
||||
bool sel = false;
|
||||
ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns;
|
||||
if( badProto ) flags |= ImGuiSelectableFlags_Disabled;
|
||||
ImGui::Selectable( v.second.address.c_str(), &sel, flags );
|
||||
ImGui::NextColumn();
|
||||
if( badProto )
|
||||
{
|
||||
tracy::TextDisabledUnformatted( v.second.procName.c_str() );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextUnformatted( v.second.procName.c_str() );
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
}
|
||||
ImGui::EndColumns();
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user