diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Durango/Xbox_Utils.cpp | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Durango/Xbox_Utils.cpp')
| -rw-r--r-- | Minecraft.Client/Durango/Xbox_Utils.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Minecraft.Client/Durango/Xbox_Utils.cpp b/Minecraft.Client/Durango/Xbox_Utils.cpp new file mode 100644 index 00000000..ab6186b6 --- /dev/null +++ b/Minecraft.Client/Durango/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 +} + |
