mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +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 )
|
||||
{
|
||||
PWSTR tmp;
|
||||
_GetThreadDescription( hnd, &tmp );
|
||||
char buf[256];
|
||||
if( tmp )
|
||||
if( _GetThreadDescription )
|
||||
{
|
||||
auto ret = wcstombs( buf, tmp, 256 );
|
||||
if( ret != 0 )
|
||||
PWSTR tmp;
|
||||
_GetThreadDescription( hnd, &tmp );
|
||||
char buf[256];
|
||||
if( tmp )
|
||||
{
|
||||
GetProfiler().SendString( thread, buf, ret, QueueType::ExternalThreadName );
|
||||
threadSent = true;
|
||||
auto ret = wcstombs( buf, tmp, 256 );
|
||||
if( ret != 0 )
|
||||
{
|
||||
GetProfiler().SendString( thread, buf, ret, QueueType::ExternalThreadName );
|
||||
threadSent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto pid = GetProcessIdOfThread( hnd );
|
||||
|
Loading…
Reference in New Issue
Block a user