mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Check if GetThreadDescription() is supported.
This functionality is available since Win 10 1607.
This commit is contained in:
parent
402d749d13
commit
a6c6943a6c
@ -486,16 +486,19 @@ void SysTraceSendExternalName( uint64_t thread )
|
|||||||
}
|
}
|
||||||
if( hnd != 0 )
|
if( hnd != 0 )
|
||||||
{
|
{
|
||||||
PWSTR tmp;
|
if( _GetThreadDescription )
|
||||||
_GetThreadDescription( hnd, &tmp );
|
|
||||||
char buf[256];
|
|
||||||
if( tmp )
|
|
||||||
{
|
{
|
||||||
auto ret = wcstombs( buf, tmp, 256 );
|
PWSTR tmp;
|
||||||
if( ret != 0 )
|
_GetThreadDescription( hnd, &tmp );
|
||||||
|
char buf[256];
|
||||||
|
if( tmp )
|
||||||
{
|
{
|
||||||
GetProfiler().SendString( thread, buf, ret, QueueType::ExternalThreadName );
|
auto ret = wcstombs( buf, tmp, 256 );
|
||||||
threadSent = true;
|
if( ret != 0 )
|
||||||
|
{
|
||||||
|
GetProfiler().SendString( thread, buf, ret, QueueType::ExternalThreadName );
|
||||||
|
threadSent = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto pid = GetProcessIdOfThread( hnd );
|
const auto pid = GetProcessIdOfThread( hnd );
|
||||||
|
Loading…
Reference in New Issue
Block a user