Skip to content

Commit

Permalink
Merge pull request #509 from Pedro-Beirao/master
Browse files Browse the repository at this point in the history
Prefer ~/Library/Application Support/dsda-doom as the data folder on macOS
  • Loading branch information
kraflab authored Sep 21, 2024
2 parents acb9194 + 5e70b26 commit 05ede58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prboom2/src/SDL/i_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,16 @@ const char *I_ConfigDir(void)

Z_Free(base);

#ifdef __APPLE__
base = dsda_ConcatDir(home, "Library/Application Support/dsda-doom");
#else
xdg_data_home = M_getenv("XDG_DATA_HOME");
if (xdg_data_home)
base = dsda_ConcatDir(xdg_data_home, "dsda-doom");
else
// $XDG_DATA_HOME should be $HOME/.local/share if not defined.
base = dsda_ConcatDir(home, ".local/share/dsda-doom");
#endif
}

M_MakeDir(base, true); // Make sure it exists
Expand Down

0 comments on commit 05ede58

Please sign in to comment.