Skip to content

Commit

Permalink
Use KLYSTRACK env variable to look for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
kometbomb committed May 7, 2017
1 parent c67ccb6 commit 45501ad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/theme.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,18 @@ static char cwd[1000] = "";

void init_resources_dir(void)
{
if (SDL_getenv("KLYSTRACK") == NULL)
{
#if RESOURCES_IN_BINARY_DIR
getcwd(cwd, sizeof(cwd));
getcwd(cwd, sizeof(cwd));
#else
strncpy(cwd, TOSTRING(RES_PATH), sizeof(cwd));
strncpy(cwd, TOSTRING(RES_PATH), sizeof(cwd));
#endif
}
else
{
strncpy(cwd, SDL_getenv("KLYSTRACK"), sizeof(cwd));
}
}

char * query_resource_directory(void)
Expand Down

0 comments on commit 45501ad

Please sign in to comment.