diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-11-25 20:57:50 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-11-25 20:57:50 +0000 |
commit | b00e7bd024285970dd00cfc75d8e690bfa475501 (patch) | |
tree | 22ceeee3027fd4872f5621650557bc8ae4391948 /source/cl_console.c | |
parent | 5eaaac93ad3b0d2777815717059d977912bd96f7 (diff) |
Changed Com_sprintf --> Q_concat in quite some cases.
Make sure WAVE sound driver is built by default.
Added --disable-wave option to `configure'.
Command line history is now remembered between sessions.
ALT+Space refreshes all servers in Server Browser.
Handle command line agruments like original Q2 engine did.
Diffstat (limited to 'source/cl_console.c')
-rw-r--r-- | source/cl_console.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/cl_console.c b/source/cl_console.c index 04586c9..7eea034 100644 --- a/source/cl_console.c +++ b/source/cl_console.c @@ -75,6 +75,7 @@ static cvar_t *con_scale; static cvar_t *con_font; static cvar_t *con_background; static cvar_t *con_scroll; +static cvar_t *con_histfile; // ============================================================================ @@ -326,11 +327,12 @@ void Con_Init( void ) { con_background = Cvar_Get( "con_background", "conback", CVAR_ARCHIVE ); con_background->changed = con_param_changed; con_scroll = Cvar_Get( "con_scroll", "0", CVAR_ARCHIVE ); + con_histfile = Cvar_Get( "con_histfile", "history.txt", CVAR_ARCHIVE ); IF_Init( &con.prompt.inputLine, 1, MAX_FIELD_TEXT ); IF_Init( &con.chatPrompt.inputLine, 1, MAX_FIELD_TEXT ); - con.prompt.Printf = Con_Printf; + con.prompt.printf = Con_Printf; // use default width if no video initialized yet scr_glconfig.vidWidth = 640; @@ -344,12 +346,21 @@ void Con_Init( void ) { con.initialized = qtrue; } +void Con_PostInit( void ) { + if( con_histfile->string[0] ) { + Prompt_LoadHistory( &con.prompt, con_histfile->string ); + } +} + /* ================ Con_Shutdown ================ */ void Con_Shutdown( void ) { + if( con_histfile->string[0] ) { + Prompt_SaveHistory( &con.prompt, con_histfile->string ); + } Prompt_Clear( &con.prompt ); } |