From 48e199bfa16e014c31c7882464d683f053f89afd Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Fri, 24 Mar 2023 03:25:11 +0400 Subject: [PATCH] engine: common: enabled printing logs to stderr for psvita platform only in developer mode --- engine/common/sys_con.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/common/sys_con.c b/engine/common/sys_con.c index daecebb9..8b4a3670 100644 --- a/engine/common/sys_con.c +++ b/engine/common/sys_con.c @@ -265,11 +265,19 @@ static void Sys_PrintStdout( const char *logtime, const char *msg ) IOS_Log( buf ); #endif // TARGET_OS_IOS -#if (XASH_NSWITCH && NSWITCH_DEBUG) || XASH_PSVITA // REMOVEME +#if XASH_NSWITCH && NSWITCH_DEBUG // just spew it to stderr normally in debug mode fprintf( stderr, "%s %s", logtime, buf ); #endif // XASH_NSWITCH && NSWITCH_DEBUG +#if XASH_PSVITA + // spew to stderr only in developer mode + if( host_developer.value ) + { + fprintf( stderr, "%s %s", logtime, buf ); + } +#endif + #elif !XASH_WIN32 // Wcon does the job Sys_PrintLogfile( STDOUT_FILENO, logtime, msg, XASH_COLORIZE_CONSOLE ); Sys_FlushStdout();