summaryrefslogtreecommitdiffstats
path: root/mbbsd/chess.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-17 23:24:57 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-17 23:24:57 +0800
commit1d88f1ec941997fad204a51371b0ef4552d62ea8 (patch)
treec9804efe188bff853bf9b566bf82af2c4d6e876d /mbbsd/chess.c
parent39439c4369ae61fca0a3b0db918b0a87a5a22e80 (diff)
downloadpttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar.gz
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar.bz2
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar.lz
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar.xz
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.tar.zst
pttbbs-1d88f1ec941997fad204a51371b0ef4552d62ea8.zip
chess photo not found problem
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3055 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chess.c')
-rw-r--r--mbbsd/chess.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index 4b717af1..bac430e0 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -1069,6 +1069,7 @@ ChessInitUser(ChessInfo* info)
info->actions->init_user(uinfo, &info->user2);
}
+#ifdef CHESSCOUNTRY
static char*
ChessPhotoInitial(ChessInfo* info)
{
@@ -1163,7 +1164,7 @@ ChessPhotoInitial(ChessInfo* info)
info->constants->turn_str[info->myturn ^ 1]);
getuser(info->user2.userid, &xuser);
- sethomefile(genbuf, info->user2.userid, "photo_cchess");
+ sethomefile(genbuf, info->user2.userid, info->constants->photo_file_name);
fp = fopen(genbuf, "r");
if (fp == NULL) {
@@ -1215,6 +1216,7 @@ ChessPhotoInitial(ChessInfo* info)
return photo;
}
+#endif /* defined(CHESSCOUNTRY) */
static void
ChessInitPlayFunc(ChessInfo* info)
@@ -1267,7 +1269,9 @@ NewChessInfo(const ChessActions* actions, const ChessConstants* constants,
ChessInitUser(info);
+#ifdef CHESSCOUNTRY
info->photo = ChessPhotoInitial(info);
+#endif
if (mode != CHESS_MODE_WATCH)
ChessHistoryInit(&info->history, constants->step_entry_size);