Beispiel #1
0
/*
 * @brief Shuts down the client console.
 */
void Cl_ShutdownConsole(void) {

	Con_RemoveConsole(&cl_console);

	file_t *file = Fs_OpenWrite("history");
	if (file) {
		Con_WriteHistory(&cl_console, file);
		Fs_Close(file);
	} else {
		Com_Warn("Couldn't write history\n");
	}

	Cmd_Remove("cl_toggle_console");
	Cmd_Remove("cl_message_mode");
	Cmd_Remove("cl_message_mode_2");

	Com_Print("Client console shutdown\n");
}
Beispiel #2
0
/**
 * @brief
 */
void Sv_ShutdownConsole(void) {

	if (!dedicated->value) {
		return;
	}

	endwin();

	Con_RemoveConsole(&sv_console);

	file_t *file = Fs_OpenWrite("history");
	if (file) {
		Con_WriteHistory(&sv_console, file);
		Fs_Close(file);
	} else {
		Com_Warn("Couldn't write history\n");
	}

#if defined(_WIN32)
	FreeConsole();
#endif
}