f = FS_OpenRealFile(file, "wb", false);
if (!f)
{
- Con_Printf(CON_ERROR "Couldn't write %s.\n", file);
+ Con_Printf(CON_ERROR "Couldn't write %s\n", file);
return;
}
+ else
+ Con_Printf("Saving config to %s ...\n", file);
Key_WriteBindings (f);
Cvar_WriteVariables (&cvars_all, f);
{
const char *file = CONFIGFILENAME;
- if(Cmd_Argc(cmd) >= 2) {
+ if(Cmd_Argc(cmd) >= 2)
file = Cmd_Argv(cmd, 1);
- Con_Printf("Saving to %s\n", file);
- }
Host_SaveConfig(file);
}
if (isdown)
{
- Con_Print("recursive shutdown\n");
+ Con_Print(CON_WARN "recursive shutdown\n");
return;
}
if (setjmp(host.abortframe))
{
- Con_Print("aborted the quitting frame?!?\n");
+ Con_Print(CON_WARN "aborted the quitting frame?!?\n");
return;
}
isdown = true;
static void Key_History_Shutdown(void)
{
- // TODO write history to a file
-
// not necessary for mobile
#ifndef DP_MOBILETOUCH
qfile_t *historyfile = FS_OpenRealFile("darkplaces_history.txt", "w", false);
if(historyfile)
{
int i;
+
+ Con_Print("Saving command history to darkplaces_history.txt ...\n");
for(i = 0; i < CONBUFFER_LINES_COUNT(&history); ++i)
FS_Printf(historyfile, "%s\n", ConBuffer_GetLine(&history, i));
FS_Close(historyfile);
}
+ else
+ Con_Print(CON_ERROR "Couldn't write darkplaces_history.txt\n");
#endif
ConBuffer_Shutdown(&history);