From eba79afc957b9dc89cfd5c21434bd8ad5e0363bb Mon Sep 17 00:00:00 2001 From: Dmitry Polyakov Date: Wed, 3 Feb 2021 14:33:37 -0500 Subject: [PATCH] add support to get game directory location from environent --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.c b/src/main.c index 9e6e2c3b..860bd3aa 100644 --- a/src/main.c +++ b/src/main.c @@ -366,6 +366,12 @@ int instead_main(int argc, char *argv[]) setdir(game_cwd); profile_load(NULL); + char *gamespath_env = NULL; + + if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env != NULL) { + games_sw = strdup(gamespath_env); + } + for (i = 1; i < argc; i++) { if (lua_sw) /* during load profile */ break; -- 2.30.0