diff --git a/Makefile b/Makefile index 1a2273bbc..4b5740fe9 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,7 @@ SDL_LIBS = -lSDL2 endif # extract version info -VERSION=$(shell grep "\#define Q3_VERSION" $(CMDIR)/q_shared.h | \ +VERSION=$(shell grep ".\+define[ \t]\+Q3_VERSION[ \t]\+\+" $(CMDIR)/q_shared.h | \ sed -e 's/.*".* \([^ ]*\)"/\1/') # common qvm definition diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 5a461f93e..c9fe260b4 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -3293,7 +3293,7 @@ static void CPUID( int func, unsigned int *regs ) static void Sys_GetProcessorId( char *vendor ) { uint32_t regs[4]; // EAX, EBX, ECX, EDX - uint32_t cpuid_level, cpuid_level_ex; + uint32_t cpuid_level_ex; char vendor_str[12 + 1]; // short CPU vendor string // setup initial features @@ -3309,7 +3309,6 @@ static void Sys_GetProcessorId( char *vendor ) // get CPUID level & short CPU vendor string CPUID( 0x0, regs ); - cpuid_level = regs[0]; memcpy(vendor_str + 0, (char*)®s[1], 4); memcpy(vendor_str + 4, (char*)®s[3], 4); memcpy(vendor_str + 8, (char*)®s[2], 4); @@ -3646,6 +3645,15 @@ void Com_Init( char *commandLine ) { FS_InitFilesystem(); + com_logfile = Cvar_Get( "logfile", "0", CVAR_TEMP ); + Cvar_CheckRange( com_logfile, "0", "4", CV_INTEGER ); + Cvar_SetDescription( com_logfile, "System console logging:\n" + " 0 - disabled\n" + " 1 - overwrite mode, buffered\n" + " 2 - overwrite mode, synced\n" + " 3 - append mode, buffered\n" + " 4 - append mode, synced\n" ); + Com_InitJournaling(); Com_ExecuteCfg(); @@ -3692,15 +3700,6 @@ void Com_Init( char *commandLine ) { // com_blood = Cvar_Get( "com_blood", "1", CVAR_ARCHIVE_ND ); - com_logfile = Cvar_Get( "logfile", "0", CVAR_TEMP ); - Cvar_CheckRange( com_logfile, "0", "4", CV_INTEGER ); - Cvar_SetDescription( com_logfile, "System console logging:\n" - " 0 - disabled\n" - " 1 - overwrite mode, buffered\n" - " 2 - overwrite mode, synced\n" - " 3 - append mode, buffered\n" - " 4 - append mode, synced\n" ); - com_timescale = Cvar_Get( "timescale", "1", CVAR_CHEAT | CVAR_SYSTEMINFO ); Cvar_CheckRange( com_timescale, "0", NULL, CV_FLOAT ); Cvar_SetDescription( com_timescale, "System timing factor:\n < 1: Slows the game down\n = 1: Regular speed\n > 1: Speeds the game up" ); diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c index ad76e7339..1ecc772df 100644 --- a/code/renderer/tr_init.c +++ b/code/renderer/tr_init.c @@ -640,8 +640,6 @@ static void InitOpenGL( void ) gls.initTime = ri.Milliseconds(); } - VarInfo(); - // set default state GL_SetDefaultState(); @@ -1843,6 +1841,8 @@ void R_Init( void ) { R_InitImages(); + VarInfo(); + R_InitShaders(); R_InitSkins(); diff --git a/code/renderervk/tr_init.c b/code/renderervk/tr_init.c index a50a598ed..b28f366c5 100644 --- a/code/renderervk/tr_init.c +++ b/code/renderervk/tr_init.c @@ -599,8 +599,6 @@ static void InitOpenGL( void ) } #endif - VarInfo(); - // set default state GL_SetDefaultState(); @@ -1884,6 +1882,8 @@ void R_Init( void ) { R_InitImages(); + VarInfo(); + #ifdef USE_VULKAN vk_create_pipelines(); #endif diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index 315bde655..acd0d1c26 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -614,8 +614,8 @@ void Sys_Sleep( int msec ) { fd_set fdset; int res; - if ( msec == 0 ) - return; + //if ( msec == 0 ) + // return; if ( msec < 0 ) { // special case: wait for console input or network packet @@ -637,7 +637,9 @@ void Sys_Sleep( int msec ) { } return; } - +#if 1 + usleep( msec * 1000 ); +#else if ( com_dedicated->integer && stdin_active ) { FD_ZERO( &fdset ); FD_SET( STDIN_FILENO, &fdset ); @@ -647,6 +649,7 @@ void Sys_Sleep( int msec ) { } else { usleep( msec * 1000 ); } +#endif } diff --git a/code/win32/win_main.c b/code/win32/win_main.c index 27ce46627..e2bdb7160 100644 --- a/code/win32/win_main.c +++ b/code/win32/win_main.c @@ -295,8 +295,8 @@ void Sys_Sleep( int msec ) { } // busy wait there because Sleep(0) will relinquish CPU - which is not what we want - if ( msec == 0 ) - return; + //if ( msec == 0 ) + // return; Sleep ( msec ); }