2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2025-01-27 10:59:56 +01:00

Prepend USE_SELECT and COLORIZE_CONSOLE with XASH_

This commit is contained in:
Alibek Omarov 2018-04-22 13:07:40 +03:00
parent 362217935f
commit ec41db7ef8

View File

@ -19,11 +19,13 @@ GNU General Public License for more details.
#endif
#if !defined( _WIN32 ) && !defined( XASH_MOBILE_PLATFORM )
#define COLORIZE_CONSOLE
#define USE_SELECT
#define XASH_COLORIZE_CONSOLE
// use with caution, running engine in Qt Creator may cause a freeze in read() call
// I was never encountered this bug anywhere else, so still enable by default
#define XASH_USE_SELECT
#endif
#ifdef USE_SELECT
#ifdef XASH_USE_SELECT
// non-blocking console input
#include <sys/select.h>
#endif
@ -40,7 +42,7 @@ static LogData s_ld;
char *Sys_Input( void )
{
#ifdef USE_SELECT
#ifdef XASH_USE_SELECT
{
fd_set rfds;
static char line[1024];
@ -163,7 +165,7 @@ void Sys_PrintLog( const char *pMsg )
if( !lastchar || lastchar == '\n')
strftime( logtime, sizeof( logtime ), "[%H:%M:%S] ", crt_tm ); //short time
#ifdef COLORIZE_CONSOLE
#ifdef XASH_COLORIZE_CONSOLE
{
char colored[4096];
const char *msg = pMsg;