mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Display compatible Tracy versions for bad protocols.
This commit is contained in:
parent
b70321fe6a
commit
94444e2afb
@ -39,6 +39,7 @@
|
||||
#include "../../server/TracyImGui.hpp"
|
||||
#include "../../server/TracyMouse.hpp"
|
||||
#include "../../server/TracyPrint.hpp"
|
||||
#include "../../server/TracyProtoHistory.hpp"
|
||||
#include "../../server/TracyStorage.hpp"
|
||||
#include "../../server/TracyVersion.hpp"
|
||||
#include "../../server/TracyView.hpp"
|
||||
@ -918,7 +919,21 @@ static void DrawContents()
|
||||
{
|
||||
tracy::TextColoredUnformatted( 0xFF0000FF, "Incompatible protocol!" );
|
||||
ImGui::SameLine();
|
||||
auto ph = tracy::ProtocolHistory;
|
||||
ImGui::TextDisabled( "(used: %i, required: %i)", v.second.protocolVersion, tracy::ProtocolVersion );
|
||||
while( ph->protocol && ph->protocol != v.second.protocolVersion ) ph++;
|
||||
if( ph->protocol )
|
||||
{
|
||||
if( ph->maxVer )
|
||||
{
|
||||
ImGui::TextDisabled( "Compatible Tracy versions: %i.%i.%i to %i.%i.%i", ph->minVer >> 16, ( ph->minVer >> 8 ) & 0xFF, ph->minVer & 0xFF, ph->maxVer >> 16, ( ph->maxVer >> 8 ) & 0xFF, ph->maxVer & 0xFF );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextDisabled( "Compatible Tracy version: %i.%i.%i", ph->minVer >> 16, ( ph->minVer >> 8 ) & 0xFF, ph->minVer & 0xFF );
|
||||
}
|
||||
}
|
||||
ImGui::Separator();
|
||||
}
|
||||
tracy::TextFocused( "IP:", v.second.address.c_str() );
|
||||
tracy::TextFocused( "Port:", portstr );
|
||||
|
Loading…
Reference in New Issue
Block a user