Fallback to callback-less version of macros if no callback support.

This commit is contained in:
Bartosz Taudul 2018-06-19 19:38:56 +02:00
parent 9b1fb01e16
commit 288744273b

View File

@ -64,8 +64,14 @@
#define TracyAlloc( ptr, size ) tracy::Profiler::MemAlloc( ptr, size ); #define TracyAlloc( ptr, size ) tracy::Profiler::MemAlloc( ptr, size );
#define TracyFree( ptr ) tracy::Profiler::MemFree( ptr ); #define TracyFree( ptr ) tracy::Profiler::MemFree( ptr );
#define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth );
#define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth ); #ifdef TRACY_HAS_CALLSTACK
# define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth );
# define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth );
#else
# define TracyAllocS( ptr, size, depth ) TracyAlloc( ptr, size )
# define TracyFreeS( ptr, depth ) TracyFree( ptr )
#endif
#endif #endif