Skip to content

Commit 9caf8fd

Browse files
committed
portable.txt now makes sure that the game is installed and run from the working directory
1 parent 73946b4 commit 9caf8fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MarathonRecomp/user/paths.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inline std::filesystem::path GetGamePath()
2727
// https://specifications.freedesktop.org/basedir/latest/
2828
// basically, user-specific files should be installed to a user-set variable of $XDG_DATA_HOME
2929
// If $XDG_DATA_HOME is either not set or empty, a default of $HOME/.local/share should be used.
30+
if (CheckPortable())
31+
{
32+
return GAME_INSTALL_DIRECTORY;
33+
}
3034
const char* homeDir = getenv("HOME");
3135
if (homeDir == nullptr)
3236
{

0 commit comments

Comments
 (0)