summaryrefslogtreecommitdiffstats
path: root/src/game.c
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-03-16 09:33:07 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-03-16 09:48:11 (EDT)
commitaeb3d25983f4912a00352c82e983da347488fedf (patch)
tree36b348f210c74bf134dafe9507bb17e9a9b3b14e /src/game.c
parentc1c166ec5498a9f07b0ab6e443469c65849468b3 (diff)
downloaddodge-balls-aeb3d25983f4912a00352c82e983da347488fedf.zip
dodge-balls-aeb3d25983f4912a00352c82e983da347488fedf.tar.gz
dodge-balls-aeb3d25983f4912a00352c82e983da347488fedf.tar.bz2
Find games either in build dir or installed
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game.c b/src/game.c
index 001fcca..2bf99c5 100644
--- a/src/game.c
+++ b/src/game.c
@@ -30,13 +30,13 @@ _db_game_is_dir(const struct dirent *entry)
}
int
-db_games_find(char ***games)
+db_games_find(const char *games_dir, char ***games)
{
struct dirent **entries;
int n;
int i;
- n = scandir("games", &entries, &_db_game_is_dir, alphasort);
+ n = scandir(games_dir, &entries, &_db_game_is_dir, alphasort);
*games = calloc(n, sizeof(**games));
if (*games == NULL) {