diff --git a/engine/common/sys_con.c b/engine/common/sys_con.c index 6a0c3dd2..53cb27d3 100644 --- a/engine/common/sys_con.c +++ b/engine/common/sys_con.c @@ -269,6 +269,7 @@ static void Sys_PrintStdout( const char *logtime, const char *msg ) // just spew it to stderr normally in debug mode fprintf( stderr, "%s %s", logtime, buf ); #endif // XASH_NSWITCH && NSWITCH_DEBUG + #elif !XASH_WIN32 // Wcon does the job Sys_PrintLogfile( STDOUT_FILENO, logtime, msg, XASH_COLORIZE_CONSOLE ); Sys_FlushStdout(); diff --git a/engine/platform/sdl/sys_sdl.c b/engine/platform/sdl/sys_sdl.c index 8c6fc13f..ed1c3661 100644 --- a/engine/platform/sdl/sys_sdl.c +++ b/engine/platform/sdl/sys_sdl.c @@ -62,14 +62,13 @@ void Platform_Init( void ) SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); SDL_StopTextInput(); #endif // XASH_SDL == 2 -#if XASH_POSIX - Posix_Daemonize(); -#endif -#ifdef XASH_WIN32 - Wcon_CreateConsole(); // system console used by dedicated server or show fatal errors -#endif -#ifdef XASH_NSWITCH + +#if XASH_NSWITCH NSwitch_Init(); +#elif XASH_WIN32 + Wcon_CreateConsole(); // system console used by dedicated server or show fatal errors +#elif XASH_POSIX + Posix_Daemonize(); #endif SDLash_InitCursors(); @@ -79,10 +78,9 @@ void Platform_Shutdown( void ) { SDLash_FreeCursors(); -#ifdef XASH_WIN32 +#if XASH_NSWITCH + NSwitch_Shutdown(); +#elif XASH_WIN32 Wcon_DestroyConsole(); #endif -#ifdef XASH_NSWITCH - NSwitch_Shutdown(); -#endif }