From: Arun Persaud Date: Sat, 27 Jun 2009 22:53:45 +0000 (-0700) Subject: give a default directory for bitmaps files (tiny change) X-Git-Tag: v4.4.0.alpha8~8 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c6d278ec04f7618d636dbedc18b062bb07cf8a74;p=xboard.git give a default directory for bitmaps files (tiny change) this is also one of the debian patches, should be rewritten to use the correct install directory. No Author was given. --- diff --git a/common.h b/common.h index bf447c9..ef9a480 100644 --- a/common.h +++ b/common.h @@ -148,6 +148,7 @@ int pclose(FILE *); #define FIRST_HOST "localhost" #define SECOND_HOST "localhost" #define TELNET_PROGRAM "telnet" +#define DEF_BITMAP_DIR "/usr/share/games/xboard/bitmaps.xchess" /* AP: shouldn't be hardcoded directory, but better than nothing at the moment */ #define MATCH_MODE "False" #define INIT_STRING "new\nrandom\n" #define WHITE_STRING "white\ngo\n" diff --git a/xboard.c b/xboard.c index 489ef64..ea5560f 100644 --- a/xboard.c +++ b/xboard.c @@ -2600,6 +2600,10 @@ XBoard square size (hint): %d\n\ if (forceMono) { fprintf(stderr, _("%s: too few colors available; trying monochrome mode\n"), programName); + + if (appData.bitmapDirectory == NULL || + appData.bitmapDirectory[0] == NULLCHAR) + appData.bitmapDirectory = DEF_BITMAP_DIR; } if (appData.lowTimeWarning && !appData.monoMode) {