Skip to content

Commit 501a54c

Browse files
always append the absolute IWAD path to iwad_dirs[] (#2122)
1 parent dcf9341 commit 501a54c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/d_iwad.c

+13
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@ static void AddSteamDirs(void)
556556
// Build a list of IWAD files
557557
//
558558

559+
static char **iwad_dirs_append;
560+
559561
void BuildIWADDirList(void)
560562
{
561563
char *env;
@@ -603,6 +605,12 @@ void BuildIWADDirList(void)
603605
AddSteamDirs();
604606
# endif
605607
#endif
608+
609+
char **dir;
610+
array_foreach(dir, iwad_dirs_append)
611+
{
612+
array_push(iwad_dirs, *dir);
613+
}
606614
}
607615

608616
//
@@ -755,6 +763,11 @@ char *D_FindIWADFile(void)
755763
{
756764
I_Error("IWAD file '%s' not found!", file);
757765
}
766+
else
767+
{
768+
char *iwad_dir = M_DirName(result);
769+
array_push(iwad_dirs_append, iwad_dir);
770+
}
758771

759772
free(file);
760773
}

0 commit comments

Comments
 (0)