summaryrefslogtreecommitdiff
path: root/src/doom/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/d_main.c')
-rw-r--r--src/doom/d_main.c25
1 files changed, 13 insertions, 12 deletions
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);