Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
#61 lnux: if not using configure, search cfg/ for config files
Browse files Browse the repository at this point in the history
  • Loading branch information
FrMo committed Apr 30, 2012
1 parent d49538c commit 9f12e37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/command.c
Expand Up @@ -888,11 +888,8 @@ void cmdRunScript(char *arg) {
sz = strtok(arg, " ");
if (!sz) return;
opt = strtok(NULL, " ");
#ifdef WIN32
script=findFile(va("%s/%s", CONFIG_PATH, sz));
#else
script=findFile(sz);
#endif

script=findFile(va("%s%s", CONFIG_PATH, sz));
if ((script != NULL) && (strlen(script)>0)) {
configRead(script, (opt && !strcmp(opt, "ignoremissing")));
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/gravit.h
Expand Up @@ -61,14 +61,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define SPAWNDIR DATA_DIR "spawn"
#define MISCDIR DATA_DIR "data"

#ifdef WIN32
# define CONFIG_PATH "cfg"
#if defined(WIN32) || (!defined(HAVE_CONFIG_H) && !defined(__MACH__))
# define CONFIG_PATH "cfg/"
# define CONFIG_FILE "cfg/gravit.cfg"
# define SCREENSAVER_FILE "cfg/screensaver.cfg"
# define SCREENSHOT_PATH "screenshots"
# define SAVE_PATH "save"
#else
# define CONFIG_PATH "."
# define CONFIG_PATH ""
# define CONFIG_FILE "gravit.cfg"
# define SCREENSAVER_FILE "screensaver.cfg"
# ifdef __MACH__
Expand Down

0 comments on commit 9f12e37

Please sign in to comment.