mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Fix build when targeting earlier windows versions by defining _WIN32_WINNT.
This commit is contained in:
parent
fc310ce15a
commit
d290e04d45
@ -37,7 +37,7 @@ void SetThreadName( std::thread& thread, const char* name )
|
|||||||
void SetThreadName( std::thread::native_handle_type handle, const char* name )
|
void SetThreadName( std::thread::native_handle_type handle, const char* name )
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# ifdef NTDDI_WIN10_RS2
|
# if defined NTDDI_VERSION && NTDDI_VERSION >= NTDDI_WIN10_RS2
|
||||||
wchar_t buf[256];
|
wchar_t buf[256];
|
||||||
mbstowcs( buf, name, 256 );
|
mbstowcs( buf, name, 256 );
|
||||||
SetThreadDescription( static_cast<HANDLE>( handle ), buf );
|
SetThreadDescription( static_cast<HANDLE>( handle ), buf );
|
||||||
@ -121,7 +121,7 @@ const char* GetThreadName( uint64_t id )
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# ifdef _WIN32
|
# ifdef _WIN32
|
||||||
# ifdef NTDDI_WIN10_RS2
|
# if defined NTDDI_VERSION && NTDDI_VERSION >= NTDDI_WIN10_RS2
|
||||||
auto hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, (DWORD)id );
|
auto hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, (DWORD)id );
|
||||||
if( hnd != 0 )
|
if( hnd != 0 )
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define __TRACYSYSTEM_HPP__
|
#define __TRACYSYSTEM_HPP__
|
||||||
|
|
||||||
#ifdef TRACY_ENABLE
|
#ifdef TRACY_ENABLE
|
||||||
# if defined __ANDROID__ || defined __CYGWIN__ || defined __APPLE__ || defined _GNU_SOURCE || ( defined _WIN32 && !defined NTDDI_WIN10_RS2 )
|
# if defined __ANDROID__ || defined __CYGWIN__ || defined __APPLE__ || defined _GNU_SOURCE || ( defined _WIN32 && ( !defined NTDDI_VERSION || NTDDI_VERSION < NTDDI_WIN10_RS2 ) )
|
||||||
# define TRACY_COLLECT_THREAD_NAMES
|
# define TRACY_COLLECT_THREAD_NAMES
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user