mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Add MxTrace function (#1054)
This commit is contained in:
32
LEGO1/omni/include/mxdebug.h
Normal file
32
LEGO1/omni/include/mxdebug.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef MXDEBUG_H
|
||||
#define MXDEBUG_H
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
// In debug mode, replace the macro with the function call.
|
||||
#define MxTrace _MxTrace
|
||||
|
||||
void _MxTrace(const char* format, ...);
|
||||
int DebugHeapState();
|
||||
|
||||
#else
|
||||
|
||||
// If not debug, MxTrace is a no-op.
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
|
||||
// Use variadic args for macro (C99)
|
||||
#define MxTrace(...)
|
||||
|
||||
#else
|
||||
|
||||
// MSVC 4.20 does not have variadic args for macros
|
||||
#define MxTrace(args)
|
||||
|
||||
#endif // COMPAT_MODE
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
#endif // MXDEBUG_H
|
Reference in New Issue
Block a user