Browse Source

engine: platform: sdl: minor style changes

pull/2/head
Alibek Omarov 1 year ago
parent
commit
d6d98bd297
  1. 1
      engine/common/sys_con.c
  2. 20
      engine/platform/sdl/sys_sdl.c

1
engine/common/sys_con.c

@ -269,6 +269,7 @@ static void Sys_PrintStdout( const char *logtime, const char *msg ) @@ -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();

20
engine/platform/sdl/sys_sdl.c

@ -62,14 +62,13 @@ void Platform_Init( void ) @@ -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 ) @@ -79,10 +78,9 @@ void Platform_Shutdown( void )
{
SDLash_FreeCursors();
#ifdef XASH_WIN32
Wcon_DestroyConsole();
#endif
#ifdef XASH_NSWITCH
#if XASH_NSWITCH
NSwitch_Shutdown();
#elif XASH_WIN32
Wcon_DestroyConsole();
#endif
}

Loading…
Cancel
Save