From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.Client/PS3/Xbox_Utils.cpp | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Minecraft.Client/PS3/Xbox_Utils.cpp (limited to 'Minecraft.Client/PS3/Xbox_Utils.cpp') diff --git a/Minecraft.Client/PS3/Xbox_Utils.cpp b/Minecraft.Client/PS3/Xbox_Utils.cpp new file mode 100644 index 00000000..ab6186b6 --- /dev/null +++ b/Minecraft.Client/PS3/Xbox_Utils.cpp @@ -0,0 +1,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 +} + -- cgit v1.2.3