Browse Source

engine: platform: sdl: minor style changes

pull/2/head
Alibek Omarov 2 years 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 )
// just spew it to stderr normally in debug mode // just spew it to stderr normally in debug mode
fprintf( stderr, "%s %s", logtime, buf ); fprintf( stderr, "%s %s", logtime, buf );
#endif // XASH_NSWITCH && NSWITCH_DEBUG #endif // XASH_NSWITCH && NSWITCH_DEBUG
#elif !XASH_WIN32 // Wcon does the job #elif !XASH_WIN32 // Wcon does the job
Sys_PrintLogfile( STDOUT_FILENO, logtime, msg, XASH_COLORIZE_CONSOLE ); Sys_PrintLogfile( STDOUT_FILENO, logtime, msg, XASH_COLORIZE_CONSOLE );
Sys_FlushStdout(); Sys_FlushStdout();

20
engine/platform/sdl/sys_sdl.c

@ -62,14 +62,13 @@ void Platform_Init( void )
SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
SDL_StopTextInput(); SDL_StopTextInput();
#endif // XASH_SDL == 2 #endif // XASH_SDL == 2
#if XASH_POSIX
Posix_Daemonize(); #if XASH_NSWITCH
#endif
#ifdef XASH_WIN32
Wcon_CreateConsole(); // system console used by dedicated server or show fatal errors
#endif
#ifdef XASH_NSWITCH
NSwitch_Init(); NSwitch_Init();
#elif XASH_WIN32
Wcon_CreateConsole(); // system console used by dedicated server or show fatal errors
#elif XASH_POSIX
Posix_Daemonize();
#endif #endif
SDLash_InitCursors(); SDLash_InitCursors();
@ -79,10 +78,9 @@ void Platform_Shutdown( void )
{ {
SDLash_FreeCursors(); SDLash_FreeCursors();
#ifdef XASH_WIN32 #if XASH_NSWITCH
Wcon_DestroyConsole();
#endif
#ifdef XASH_NSWITCH
NSwitch_Shutdown(); NSwitch_Shutdown();
#elif XASH_WIN32
Wcon_DestroyConsole();
#endif #endif
} }

Loading…
Cancel
Save