Move TRACY_UWP define to own header

This commit is contained in:
Balazs Kovacsics
2022-02-10 20:26:45 +01:00
parent 7169f5f30a
commit a0a56eaf9e
5 changed files with 33 additions and 32 deletions

View File

@@ -10,11 +10,7 @@
# endif
# include <windows.h>
# include <malloc.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
# define TRACY_ON_UWP
# endif
# include "TracyUwp.hpp"
#else
# include <pthread.h>
# include <string.h>
@@ -132,7 +128,7 @@ void ThreadNameMsvcMagic( const THREADNAME_INFO& info )
TRACY_API void SetThreadName( const char* name )
{
#if defined _WIN32
# if defined TRACY_ON_UWP
# ifdef TRACY_UWP
static auto _SetThreadDescription = &::SetThreadDescription;
# else
static auto _SetThreadDescription = (t_SetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "SetThreadDescription" );
@@ -200,7 +196,7 @@ TRACY_API const char* GetThreadName( uint32_t id )
}
#else
# if defined _WIN32
# if defined TRACY_ON_UWP
# ifdef TRACY_UWP
static auto _GetThreadDescription = &::GetThreadDescription;
# else
static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" );