diff options
author | Simon Howard | 2014-03-25 22:39:51 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-25 22:39:51 -0400 |
commit | 9981c42b4a8ab3000b22b9acf6ad4b0edd4b0ae7 (patch) | |
tree | 3abaed53b3e757cd5e12d4eeadc9f28e5f94a161 /src/d_iwad.c | |
parent | bc8517a05648054df17e556d4116e63a20fef75a (diff) | |
download | chocolate-doom-9981c42b4a8ab3000b22b9acf6ad4b0edd4b0ae7.tar.gz chocolate-doom-9981c42b4a8ab3000b22b9acf6ad4b0edd4b0ae7.tar.bz2 chocolate-doom-9981c42b4a8ab3000b22b9acf6ad4b0edd4b0ae7.zip |
Set GUS patch path variable using D_SetVariable.
commit 42faefce1fd03 added code to set the GUS patch path
automatically when the BFG Edition is installed, but this caused
problems because gusconf.c is not included as part of the build for
the setup tool. Use D_SetVariable() instead which accomplishes the
same thing without a hard dependency.
Diffstat (limited to 'src/d_iwad.c')
-rw-r--r-- | src/d_iwad.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/d_iwad.c b/src/d_iwad.c index 0d3e5e48..ae66db79 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -32,7 +32,6 @@ #include "deh_str.h" #include "doomkeys.h" #include "d_iwad.h" -#include "gusconf.h" #include "i_system.h" #include "m_argv.h" #include "m_config.h" @@ -336,12 +335,14 @@ static void CheckSteamEdition(void) static void CheckSteamGUSPatches(void) { + const char *current_path; char *install_path; char *patch_path; int len; // Already configured? Don't stomp on the user's choices. - if (gus_patch_path != NULL && strlen(gus_patch_path) > 0) + current_path = D_GetStrVariable("gus_patch_path"); + if (current_path != NULL && strlen(current_path) > 0) { return; } @@ -363,13 +364,10 @@ static void CheckSteamGUSPatches(void) { snprintf(patch_path, len, "%s\\%s", install_path, STEAM_BFG_GUS_PATCHES); - gus_patch_path = patch_path; - } - else - { - free(patch_path); + D_SetVariable("gus_patch_path", patch_path); } + free(patch_path); free(install_path); } |