diff options
author | Simon Howard | 2006-10-25 18:12:08 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-25 18:12:08 +0000 |
commit | 33304ee6ff09806002181e6b739e2a4859be1ade (patch) | |
tree | 75c98f8719ea188fa36bf9216854ad69a754b121 /setup/configfile.c | |
parent | 3fd97506e16b5c6e4f744ebe211d698c3e734619 (diff) | |
download | chocolate-doom-33304ee6ff09806002181e6b739e2a4859be1ade.tar.gz chocolate-doom-33304ee6ff09806002181e6b739e2a4859be1ade.tar.bz2 chocolate-doom-33304ee6ff09806002181e6b739e2a4859be1ade.zip |
Make the "test controls" option work - write the current config to
temporary config files and make Doom use these when executing it.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 738
Diffstat (limited to 'setup/configfile.c')
-rw-r--r-- | setup/configfile.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/setup/configfile.c b/setup/configfile.c index 6042d318..f974f043 100644 --- a/setup/configfile.c +++ b/setup/configfile.c @@ -533,3 +533,47 @@ void M_LoadDefaults (void) LoadDefaultCollection(&extra_defaults); } +// +// Save normal (default.cfg) defaults to a given file +// + +void M_SaveMainDefaults(char *filename) +{ + char *main_filename; + + // Save the normal filename and set this one + + main_filename = doom_defaults.filename; + doom_defaults.filename = filename; + + // Save the file + + SaveDefaultCollection(&doom_defaults); + + // Restore the normal filename + + doom_defaults.filename = main_filename; +} + +// +// Save extra (chocolate-doom.cfg) defaults to a given file +// + +void M_SaveExtraDefaults(char *filename) +{ + char *main_filename; + + // Save the normal filename and set this one + + main_filename = extra_defaults.filename; + extra_defaults.filename = filename; + + // Save the file + + SaveDefaultCollection(&extra_defaults); + + // Restore the normal filename + + extra_defaults.filename = main_filename; +} + |