From 5902b48489d6c12f430b07ac8746c96d7dbeedb1 Mon Sep 17 00:00:00 2001 From: scw Date: Wed, 17 Aug 2005 17:03:48 +0000 Subject: Don't move two steps when client is dbcs-awared. (don't know if this is a good solution) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3058 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chess.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'mbbsd/chess.c') diff --git a/mbbsd/chess.c b/mbbsd/chess.c index bac430e0..226feadf 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -339,6 +339,9 @@ ChessPlayFuncMy(ChessInfo* info) int endturn = 0; ChessGameResult game_result = CHESS_RESULT_CONTINUE; int ch; +#ifdef DBCSAWARE + int move_count = 0; +#endif info->ipass = 0; bell(); @@ -413,12 +416,30 @@ ChessPlayFuncMy(ChessInfo* info) break; case KEY_LEFT: +#ifdef DBCSAWARE + if (!ISDBCSAWARE()) { + if (++move_count >= 2) + move_count = 0; + else + break; + } +#endif /* defined(DBCSAWARE) */ + info->cursor.c--; if (info->cursor.c < 0) info->cursor.c = info->constants->board_width - 1; break; case KEY_RIGHT: +#ifdef DBCSAWARE + if (!ISDBCSAWARE()) { + if (++move_count >= 2) + move_count = 0; + else + break; + } +#endif /* defined(DBCSAWARE) */ + info->cursor.c++; if (info->cursor.c >= info->constants->board_width) info->cursor.c = 0; -- cgit v1.2.3