1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Store messages.

This commit is contained in:
Bartosz Taudul
2017-10-14 14:28:04 +02:00
parent 8c7b60fbe6
commit fa8030009f
5 changed files with 69 additions and 5 deletions
+5 -1
View File
@@ -193,7 +193,7 @@ bool Profiler::SendData( const char* data, size_t len )
bool Profiler::SendString( uint64_t str, const char* ptr, QueueType type )
{
assert( type == QueueType::StringData || type == QueueType::ThreadName || type == QueueType::CustomStringData || type == QueueType::PlotName );
assert( type == QueueType::StringData || type == QueueType::ThreadName || type == QueueType::CustomStringData || type == QueueType::PlotName || type == QueueType::MessageData );
QueueItem item;
item.hdr.type = type;
@@ -269,6 +269,10 @@ bool Profiler::HandleServerQuery()
case ServerQueryPlotName:
SendString( ptr, (const char*)ptr, QueueType::PlotName );
break;
case ServerQueryMessage:
SendString( ptr, (const char*)ptr, QueueType::MessageData );
delete[] (const char*)ptr;
break;
default:
assert( false );
break;