From 9981c42b4a8ab3000b22b9acf6ad4b0edd4b0ae7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 25 Mar 2014 22:39:51 -0400 Subject: 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. --- src/doom/d_main.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/doom/d_main.c') diff --git a/src/doom/d_main.c b/src/doom/d_main.c index b2566176..e6b993c4 100644 --- a/src/doom/d_main.c +++ b/src/doom/d_main.c @@ -1156,18 +1156,6 @@ void D_DoomMain (void) DEH_Init(); #endif - iwadfile = D_FindIWAD(IWAD_MASK_DOOM, &gamemission); - - // None found? - - if (iwadfile == NULL) - { - I_Error("Game mode indeterminate. No IWAD file was found. Try\n" - "specifying one with the '-iwad' command line parameter.\n"); - } - - modifiedgame = false; - //! // @vanilla // @@ -1293,6 +1281,19 @@ void D_DoomMain (void) // Save configuration at exit. I_AtExit(M_SaveDefaults, false); + // Find main IWAD file and load it. + iwadfile = D_FindIWAD(IWAD_MASK_DOOM, &gamemission); + + // None found? + + if (iwadfile == NULL) + { + I_Error("Game mode indeterminate. No IWAD file was found. Try\n" + "specifying one with the '-iwad' command line parameter.\n"); + } + + modifiedgame = false; + DEH_printf("W_Init: Init WADfiles.\n"); D_AddFile(iwadfile); -- cgit v1.2.3