Commit 39176642 authored by Evan Ramos's avatar Evan Ramos

SW: Save console variable settings to voidsw_cvars.cfg

parent cb02aa6c
......@@ -650,6 +650,30 @@ int32_t CONFIG_ReadSetup(void)
return 0;
}
static void CONFIG_WriteCvars()
{
static const char filename[] = "voidsw_cvars.cfg";
buildvfs_FILE fp = buildvfs_fopen_write(filename);
if (!fp)
{
OSD_Printf("Error writing %s: %s\n", filename, strerror(errno));
return;
}
buildvfs_fputstr(fp, "// this file is automatically generated by ");
buildvfs_fputstrptr(fp, AppProperName);
buildvfs_fputstr(fp, "\n");
OSD_WriteAliases(fp);
OSD_WriteCvars(fp);
buildvfs_fclose(fp);
OSD_Printf("Wrote %s\n", filename);
}
/*
===================
=
......@@ -764,5 +788,7 @@ void CONFIG_WriteSetup(void)
SCRIPT_Save(scripthandle, setupfilename);
SCRIPT_Free(scripthandle);
CONFIG_WriteCvars();
}
......@@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#include "build.h"
#include "baselayer.h"
#include "osd.h"
#include "keys.h"
#include "game.h"
......@@ -129,6 +131,12 @@ void InitSetup(void)
}*/
RTS_Init(RTSName);
OSD_Exec("voidsw_cvars.cfg");
OSD_Exec("voidsw_autoexec.cfg");
system_getcvars();
FX_InitCvars();
}
#if 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment