FS_ChangeGameDirs
================
*/
-extern void Host_SaveConfig_f (void);
+extern void Host_SaveConfig (void);
extern void Host_LoadConfig_f (void);
qboolean FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qboolean complain, qboolean failmissing)
{
// halt demo playback to close the file
CL_Disconnect();
- Host_SaveConfig_f();
+ Host_SaveConfig();
fs_numgamedirs = numgamedirs;
for (i = 0;i < fs_numgamedirs;i++)
Writes key bindings and archived cvars to config.cfg
===============
*/
-void Host_SaveConfig_f(void)
+void Host_SaveConfig_to(const char *file)
{
qfile_t *f;
- const char *file = "config.cfg";
-
- if(Cmd_Argc() >= 2) {
- file = Cmd_Argv(1);
- Con_Printf("Saving to %s\n", file);
- }
// dedicated servers initialize the host but don't parse and set the
// config.cfg cvars
FS_Close (f);
}
}
+void Host_SaveConfig(void)
+{
+ Host_SaveConfig_to("config.cfg");
+}
+void Host_SaveConfig_f(void)
+{
+ const char *file = "config.cfg";
+ if(Cmd_Argc() >= 2) {
+ file = Cmd_Argv(1);
+ Con_Printf("Saving to %s\n", file);
+ }
+
+ Host_SaveConfig_to(file);
+}
/*
===============
#endif
CL_Video_Shutdown();
- Host_SaveConfig_f();
+ Host_SaveConfig();
CDAudio_Shutdown ();
S_Terminate ();