From b3c23dee5bdb48bc46fb8b407523c7cc37ba230c Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Sun, 23 Feb 2020 08:19:02 +0200 Subject: [PATCH] make cppcheck happy and use same version messages as other renders --- src/client/refresh/soft/header/local.h | 2 +- src/client/refresh/soft/sw_main.c | 9 +++++---- src/client/refresh/soft/sw_model.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/client/refresh/soft/header/local.h b/src/client/refresh/soft/header/local.h index 1f2b6e93..8265cf85 100644 --- a/src/client/refresh/soft/header/local.h +++ b/src/client/refresh/soft/header/local.h @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#define REF_VERSION "SOFT 0.01" +#define REF_VERSION "Yamagi Quake II Software Refresher" // up / down #define PITCH 0 diff --git a/src/client/refresh/soft/sw_main.c b/src/client/refresh/soft/sw_main.c index f81d6262..90625cf0 100644 --- a/src/client/refresh/soft/sw_main.c +++ b/src/client/refresh/soft/sw_main.c @@ -423,6 +423,9 @@ R_Init static qboolean RE_Init(void) { + R_Printf(PRINT_ALL, "Refresh: " REF_VERSION "\n"); + R_Printf(PRINT_ALL, "Client: " YQ2VERSION "\n\n"); + R_RegisterVariables (); R_InitImages (); Mod_Init (); @@ -455,8 +458,6 @@ RE_Init(void) // create the window ri.Vid_MenuInit(); - R_Printf(PRINT_ALL, "ref_soft version: "REF_VERSION"\n"); - return true; } @@ -1480,7 +1481,7 @@ RE_SetMode(void) vid_fullscreen->modified = false; R_Printf(PRINT_ALL, "%s() - fullscreen unavailable in this mode\n", __func__); - if ((err = SWimp_SetMode(&vid.width, &vid.height, r_mode->value, 0)) == rserr_ok) + if ((SWimp_SetMode(&vid.width, &vid.height, r_mode->value, 0)) == rserr_ok) { return true; } @@ -1501,7 +1502,7 @@ RE_SetMode(void) } /* try setting it back to something safe */ - if ((err = SWimp_SetMode(&vid.width, &vid.height, sw_state.prev_mode, 0)) != rserr_ok) + if ((SWimp_SetMode(&vid.width, &vid.height, sw_state.prev_mode, 0)) != rserr_ok) { R_Printf(PRINT_ALL, "%s() - could not revert to safe mode\n", __func__); return false; diff --git a/src/client/refresh/soft/sw_model.c b/src/client/refresh/soft/sw_model.c index 7489153c..c887147e 100644 --- a/src/client/refresh/soft/sw_model.c +++ b/src/client/refresh/soft/sw_model.c @@ -140,7 +140,7 @@ Mod_ForName (char *name, qboolean crash) if (i == mod_numknown) { if (mod_numknown == MAX_MOD_KNOWN) - ri.Sys_Error(ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); + ri.Sys_Error(ERR_DROP, "%s: mod_numknown == MAX_MOD_KNOWN", __func__); mod_numknown++; } strcpy (mod->name, name); @@ -962,7 +962,7 @@ Mod_LoadBrushModel(model_t *mod, void *buffer, int modfilelen) dmodel_t *bm; if (loadmodel != mod_known) - ri.Sys_Error(ERR_DROP, "Loaded a brush model after the world"); + ri.Sys_Error(ERR_DROP, "%s: Loaded a brush model after the world", __func__); header = (dheader_t *)buffer;