aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Durango/Xbox_Utils.cpp
blob: ab6186b66e387dcfdc7ec667d14f21e084b6e583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "stdafx.h"

//--------------------------------------------------------------------------------------
// Name: DebugSpewV()
// Desc: Internal helper function
//--------------------------------------------------------------------------------------
#ifndef _CONTENT_PACKAGE
static VOID DebugSpewV( const CHAR* strFormat, const va_list pArgList )
{
#ifdef __PS3__
	assert(0);
#else
	CHAR str[2048];
	// Use the secure CRT to avoid buffer overruns. Specify a count of
	// _TRUNCATE so that too long strings will be silently truncated
	// rather than triggering an error.
	_vsnprintf_s( str, _TRUNCATE, strFormat, pArgList );
	OutputDebugStringA( str );
#endif
}
#endif

//--------------------------------------------------------------------------------------
// Name: DebugSpew()
// Desc: Prints formatted debug spew
//--------------------------------------------------------------------------------------
#ifdef  _Printf_format_string_  // VC++ 2008 and later support this annotation
VOID CDECL DebugSpew( _In_z_ _Printf_format_string_ const CHAR* strFormat, ... )
#else
VOID CDECL DebugPrintf( const CHAR* strFormat, ... )
#endif
{
#ifndef _CONTENT_PACKAGE
	va_list pArgList;
	va_start( pArgList, strFormat );
	DebugSpewV( strFormat, pArgList );
	va_end( pArgList );
#endif
}