From bc5d8c6815faf881df89444db887435ddb3bd247 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 31 Oct 2021 18:20:28 +0000 Subject: [PATCH] Hide some cvars that don't have well-defined defaults when using 'cvarlist -c'. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6092 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/renderer.c | 2 +- engine/client/snd_dma.c | 4 ++-- engine/common/cvar.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 311ef3d52..708428072 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -284,7 +284,7 @@ cvar_t vid_conwidth = CVARF ("vid_conwidth", "0", //see R_RestartRenderer_f for the effective default 'if (newr.renderer == -1)'. cvar_t vid_renderer = CVARFD ("vid_renderer", "", CVAR_ARCHIVE | CVAR_VIDEOLATCH, "Specifies which backend is used. Values that might work are: sv (dedicated server), headless (null renderer), vk (vulkan), gl (opengl), egl (opengl es), d3d9 (direct3d 9), d3d11 (direct3d 11, with default hardware rendering), d3d11 warp (direct3d 11, with software rendering)."); -cvar_t vid_renderer_opts = CVARFD ("_vid_renderer_opts", NULL, CVAR_NOSET, "The possible video renderer apis, in \"value\" \"description\" pairs, for gamecode to read."); +cvar_t vid_renderer_opts = CVARFD ("_vid_renderer_opts", NULL, CVAR_NOSET|CVAR_NOSAVE, "The possible video renderer apis, in \"value\" \"description\" pairs, for gamecode to read."); cvar_t vid_bpp = CVARFD ("vid_bpp", "0", CVAR_ARCHIVE | CVAR_VIDEOLATCH, "The number of colour bits to request from the renedering context"); diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index 73c386be2..3c427f0ac 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -157,12 +157,12 @@ cvar_t snd_mixerthread = CVARAD( "s_mixerthread", "1", "snd_mixerthread", "When enabled sound mixing will be run on a separate thread. Currently supported only by directsound. Other drivers may unconditionally thread audio. Set to 0 only if you have issues."); cvar_t snd_device = CVARAFD( "s_device", "", "snd_device", CVAR_ARCHIVE, "This is the sound device(s) to use, in the form of driver:device.\nIf desired, multiple devices can be listed in space-seperated (quoted) tokens. _s_device_opts contains any enumerated options.\nIn all seriousness, use the menu to set this if you wish to keep your hair."); -cvar_t snd_device_opts = CVARFD( "_s_device_opts", "", CVAR_NOSET, "The possible audio output devices, in \"value\" \"description\" pairs, for gamecode to read."); +cvar_t snd_device_opts = CVARFD( "_s_device_opts", "", CVAR_NOSET|CVAR_NOSAVE, "The possible audio output devices, in \"value\" \"description\" pairs, for gamecode to read."); #ifdef VOICECHAT static void QDECL S_Voip_Play_Callback(cvar_t *var, char *oldval); cvar_t snd_voip_capturedevice = CVARF("cl_voip_capturedevice", "", CVAR_ARCHIVE); -cvar_t snd_voip_capturedevice_opts = CVARFD("_cl_voip_capturedevice_opts", "", CVAR_NOSET, "The possible audio capture devices, in \"value\" \"description\" pairs, for gamecode to read."); +cvar_t snd_voip_capturedevice_opts = CVARFD("_cl_voip_capturedevice_opts", "", CVAR_NOSET|CVAR_NOSAVE, "The possible audio capture devices, in \"value\" \"description\" pairs, for gamecode to read."); int voipbutton; //+voip, no longer part of cl_voip_send to avoid it getting saved cvar_t snd_voip_send = CVARFD("cl_voip_send", "0", CVAR_ARCHIVE|CVAR_NOTFROMSERVER, "Sends voice-over-ip data to the server whenever it is set.\n0: only send voice if +voip is pressed.\n1: voice activation.\n2: constantly send.\n+4: Do not send to game, only to rtp sessions."); cvar_t snd_voip_test = CVARD("cl_voip_test", "0", "If 1, enables you to hear your own voice directly, bypassing the server and thus without networking latency, but is fine for checking audio levels. Note that sv_voip_echo can be set if you want to include latency and packetloss considerations, but setting that cvar requires server admin access and is thus much harder to use."); diff --git a/engine/common/cvar.c b/engine/common/cvar.c index 47d7aad8e..8db7025a8 100644 --- a/engine/common/cvar.c +++ b/engine/common/cvar.c @@ -451,7 +451,7 @@ showhelp: if ((listflags & CLF_FLAGMASK) && !(cmd->flags & cvarflags)) continue; - if ((listflags & CLF_CHANGEDONLY) && cmd->defaultstr && !strcmp(cmd->string, cmd->defaultstr)) + if ((listflags & CLF_CHANGEDONLY) && ((cmd->flags & (CVAR_NOSET|CVAR_NOSAVE)) || (cmd->defaultstr && !strcmp(cmd->string, cmd->defaultstr)))) continue; // print cvar list header