mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 09:54:18 +00:00
Add MxTrace function (#1054)
This commit is contained in:
30
LEGO1/omni/src/common/mxdebug.cpp
Normal file
30
LEGO1/omni/src/common/mxdebug.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "mxdebug.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
// Debug-only wrapper for OutputDebugString to support variadic arguments.
|
||||
// Identical functions at BETA10 0x100ec9fe and 0x101741b5 are more limited in scope.
|
||||
// This is the most widely used version.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
// FUNCTION: BETA10 0x10124cb9
|
||||
int DebugHeapState()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10124cdd
|
||||
void _MxTrace(const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buffer[256];
|
||||
|
||||
va_start(args, format);
|
||||
_vsnprintf(buffer, 256, format, args);
|
||||
OutputDebugString(buffer);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user