diff --git a/engine/client/console.c b/engine/client/console.c index 41d2793f..d32529b7 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -2056,16 +2056,13 @@ void Con_DrawVersion( void ) break; } - if( !host.force_draw_version ) - { - if(( cls.key_dest != key_menu && !draw_version ) || CL_IsDevOverviewMode() == 2 || net_graph->value ) - return; - } - if( host.force_draw_version_time > host.realtime ) - host.force_draw_version = false; + draw_version = true; + + if(( cls.key_dest != key_menu && !draw_version ) || CL_IsDevOverviewMode() == 2 || net_graph->value ) + return; - if( host.force_draw_version || draw_version ) + if( draw_version ) Q_snprintf( curbuild, MAX_STRING, XASH_ENGINE_NAME " v%i/" XASH_VERSION " (%s-%s build %i)", PROTOCOL_VERSION, Q_buildos(), Q_buildarch(), Q_buildnum( )); else Q_snprintf( curbuild, MAX_STRING, "v%i/" XASH_VERSION " (%s-%s build %i)", PROTOCOL_VERSION, Q_buildos(), Q_buildarch(), Q_buildnum( )); diff --git a/engine/common/common.h b/engine/common/common.h index 0d6f7e94..b6579c46 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -144,7 +144,7 @@ typedef enum #define GameState (&host.game) -#define FORCE_DRAW_VERSION_TIME 5.0f // draw version for 5 seconds +#define FORCE_DRAW_VERSION_TIME 5.0 // draw version for 5 seconds #ifdef _DEBUG void DBG_AssertFunction( qboolean fExpr, const char* szExpr, const char* szFile, int szLine, const char* szMessage ); @@ -360,8 +360,7 @@ typedef struct host_parm_s qboolean change_game; // initialize when game is changed qboolean mouse_visible; // vgui override cursor control (never change outside Platform_SetCursorType!) qboolean shutdown_issued; // engine is shutting down - qboolean force_draw_version; // used when fraps is loaded - float force_draw_version_time; + double force_draw_version_time; qboolean apply_game_config; // when true apply only to game cvars and ignore all other commands qboolean apply_opengl_config;// when true apply only to opengl cvars and ignore all other commands qboolean config_executed; // a bit who indicated was config.cfg already executed e.g. from valve.rc diff --git a/engine/platform/sdl/events.c b/engine/platform/sdl/events.c index a71added..f668cdff 100644 --- a/engine/platform/sdl/events.c +++ b/engine/platform/sdl/events.c @@ -248,7 +248,6 @@ static void SDLash_KeyEvent( SDL_KeyboardEvent key ) case SDL_SCANCODE_COMMA: keynum = ','; break; case SDL_SCANCODE_PRINTSCREEN: { - host.force_draw_version = true; host.force_draw_version_time = host.realtime + FORCE_DRAW_VERSION_TIME; break; } @@ -374,7 +373,6 @@ static void SDLash_ActiveEvent( int gain ) { SNDDMA_Activate( true ); } - host.force_draw_version = true; host.force_draw_version_time = host.realtime + FORCE_DRAW_VERSION_TIME; if( vid_fullscreen->value ) VID_SetMode(); @@ -398,8 +396,7 @@ static void SDLash_ActiveEvent( int gain ) { SNDDMA_Activate( false ); } - host.force_draw_version = true; - host.force_draw_version_time = host.realtime + 2; + host.force_draw_version_time = host.realtime + 2.0; VID_RestoreScreenResolution(); } } @@ -626,7 +623,6 @@ static void SDLash_EventFilter( SDL_Event *event ) break; case SDL_WINDOWEVENT_RESTORED: host.status = HOST_FRAME; - host.force_draw_version = true; host.force_draw_version_time = host.realtime + FORCE_DRAW_VERSION_TIME; if( vid_fullscreen->value ) VID_SetMode();