mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Display list of broadcasting clients.
This commit is contained in:
parent
36989da2c6
commit
67daff1452
@ -26,6 +26,7 @@
|
|||||||
#define STBI_ONLY_PNG
|
#define STBI_ONLY_PNG
|
||||||
#include "stb_image.h"
|
#include "stb_image.h"
|
||||||
|
|
||||||
|
#include "../../common/TracyProtocol.hpp"
|
||||||
#include "../../server/tracy_flat_hash_map.hpp"
|
#include "../../server/tracy_flat_hash_map.hpp"
|
||||||
#include "../../server/tracy_pdqsort.h"
|
#include "../../server/tracy_pdqsort.h"
|
||||||
#include "../../server/TracyBadVersion.hpp"
|
#include "../../server/TracyBadVersion.hpp"
|
||||||
@ -458,6 +459,33 @@ int main( int argc, char** argv )
|
|||||||
tracy::BadVersion( badVer );
|
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();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user