From a37f70e5f058b368cc3b3ca3f5a646e94baef69b Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 1 Jun 2020 01:41:17 +0000 Subject: [PATCH] Add con_savehistory cvar, so the user can disable saving conhistory.txt all the time. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5702 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/client/console.c b/engine/client/console.c index c983157af..bc1846cdd 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -76,6 +76,7 @@ cvar_t con_separatechat = CVAR("con_separatechat", "0"); static cvar_t con_timestamps = CVAR("con_timestamps", "0"); static cvar_t con_timeformat = CVAR("con_timeformat", "(%H:%M:%S) "); cvar_t con_textsize = CVARD("con_textsize", "8", "Resize the console text to be a different height, scaled separately from the hud. The value is the height in (virtual) pixels."); +static cvar_t con_savehistory = CVARD("con_savehistory", "1", "Write/update conhistory.txt"); extern cvar_t log_developer; void con_window_cb(cvar_t *var, char *oldval) @@ -591,6 +592,9 @@ void Con_History_Save(void) if (!FS_GameIsInitialised()) return; + if (!con_savehistory.ival) + return; + file = FS_OpenVFS("conhistory.txt", "wb", FS_ROOT); if (file) { @@ -826,6 +830,7 @@ void Con_Init (void) Cvar_Register (&con_timeformat, "Console controls"); Cvar_Register (&con_textsize, "Console controls"); Cvar_Register (&con_window, "Console controls"); + Cvar_Register (&con_savehistory, "Console controls"); Cvar_ForceCallback(&con_window); Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);