Skip to content

Commit

Permalink
always append the absolute IWAD path to iwad_dirs[] (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath authored Jan 6, 2025
1 parent dcf9341 commit 501a54c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/d_iwad.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ static void AddSteamDirs(void)
// Build a list of IWAD files
//

static char **iwad_dirs_append;

void BuildIWADDirList(void)
{
char *env;
Expand Down Expand Up @@ -603,6 +605,12 @@ void BuildIWADDirList(void)
AddSteamDirs();
# endif
#endif

char **dir;
array_foreach(dir, iwad_dirs_append)
{
array_push(iwad_dirs, *dir);
}
}

//
Expand Down Expand Up @@ -755,6 +763,11 @@ char *D_FindIWADFile(void)
{
I_Error("IWAD file '%s' not found!", file);
}
else
{
char *iwad_dir = M_DirName(result);
array_push(iwad_dirs_append, iwad_dir);
}

free(file);
}
Expand Down

0 comments on commit 501a54c

Please sign in to comment.