diff options
author | Simon Howard | 2006-10-24 19:58:39 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-24 19:58:39 +0000 |
commit | 5f96cc7fdc463b695419d0589b1d19fe38e6efe6 (patch) | |
tree | 98a0acbaa7022acd035b07ca3f4512c0c036958e /setup/execute.c | |
parent | 4a31b4fbbaaf716b45403698e8c0b5dd523d0f47 (diff) | |
download | chocolate-doom-5f96cc7fdc463b695419d0589b1d19fe38e6efe6.tar.gz chocolate-doom-5f96cc7fdc463b695419d0589b1d19fe38e6efe6.tar.bz2 chocolate-doom-5f96cc7fdc463b695419d0589b1d19fe38e6efe6.zip |
Pass through config variables into response file when launching Doom.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 731
Diffstat (limited to 'setup/execute.c')
-rw-r--r-- | setup/execute.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/setup/execute.c b/setup/execute.c index 5e78970a..b2933c9a 100644 --- a/setup/execute.c +++ b/setup/execute.c @@ -29,6 +29,7 @@ #include "textscreen.h" #include "execute.h" +#include "m_argv.h" struct execute_context_s { @@ -59,6 +60,25 @@ execute_context_t *NewExecuteContext(void) return result; } +void AddConfigParameters(execute_context_t *context) +{ + int p; + + p = M_CheckParm("-config"); + + if (p > 0) + { + AddCmdLineParameter(context, "-config \"%s\"", myargv[p + 1]); + } + + p = M_CheckParm("-extraconfig"); + + if (p > 0) + { + AddCmdLineParameter(context, "-extraconfig \"%s\"", myargv[p + 1]); + } +} + void AddCmdLineParameter(execute_context_t *context, char *s, ...) { va_list args; |