diff --git a/src/bgfx.cpp b/src/bgfx.cpp index c471f02c..f93e128f 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -130,7 +130,7 @@ namespace bgfx }; #ifndef BGFX_CONFIG_MEMORY_TRACKING -# define BGFX_CONFIG_MEMORY_TRACKING (BGFX_CONFIG_DEBUG && BX_CONFIG_SUPPORTED_THREADING) +# define BGFX_CONFIG_MEMORY_TRACKING (BGFX_CONFIG_DEBUG && BX_CONFIG_SUPPORTS_THREADING) #endif // BGFX_CONFIG_MEMORY_TRACKING class AllocatorStub : public bx::ReallocatorI diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 2fd00fe5..2f3013b9 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -6,6 +6,13 @@ #ifndef BGFX_P_H_HEADER_GUARD #define BGFX_P_H_HEADER_GUARD +#if BGFX_CONFIG_DEBUG +# define BX_TRACE _BX_TRACE +# define BX_WARN _BX_WARN +# define BX_CHECK _BX_CHECK +# define BX_CONFIG_ALLOCATOR_DEBUG 1 +#endif // BGFX_CONFIG_DEBUG + #include "bgfx.h" #include "config.h" @@ -44,13 +51,6 @@ namespace bgfx } \ BX_MACRO_BLOCK_END -#if BGFX_CONFIG_DEBUG -# define BX_TRACE _BX_TRACE -# define BX_WARN _BX_WARN -# define BX_CHECK _BX_CHECK -# define BX_CONFIG_ALLOCATOR_DEBUG 1 -#endif // BGFX_CONFIG_DEBUG - #define BGFX_FATAL(_condition, _err, _format, ...) \ BX_MACRO_BLOCK_BEGIN \ if (!BX_IGNORE_C4127(_condition) ) \ diff --git a/src/config.h b/src/config.h index ffed9914..4510f7b8 100644 --- a/src/config.h +++ b/src/config.h @@ -6,7 +6,7 @@ #ifndef BGFX_CONFIG_H_HEADER_GUARD #define BGFX_CONFIG_H_HEADER_GUARD -#include +#include #ifndef BGFX_CONFIG_DEBUG # define BGFX_CONFIG_DEBUG 0