From c6d278ec04f7618d636dbedc18b062bb07cf8a74 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 27 Jun 2009 15:53:45 -0700 Subject: [PATCH] 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. --- common.h | 1 + xboard.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) 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) { -- 1.7.0.4