From f2ada152418a3279e6389749f347eda9a96d38b3 Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 13 Feb 2004 04:46:50 +0000 Subject: [PATCH] abort draw quickly if platform can't --- common/board.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/board.c b/common/board.c index 27ba516ee..1542b798c 100644 --- a/common/board.c +++ b/common/board.c @@ -467,8 +467,11 @@ board_commitTurn( BoardCtxt* board ) if ( !legal || board->badWordRejected ) { result = XP_FALSE; } else { - /* hide the tray so no peeking */ + /* Hide the tray so no peeking. Leave it hidden even if user + cancels as otherwise another player could get around + passwords and peek at tiles. */ result = board_hideTray( board ); + if ( util_userQuery( board->util, QUERY_COMMIT_TURN, stream ) ) { result = server_commitMove( board->server ) || result; @@ -880,14 +883,15 @@ board_draw( BoardCtxt* board ) { drawScoreBoard( board ); - if ( board->needsDrawing ) { + if ( board->needsDrawing + && draw_boardBegin( board->draw, &board->boardBounds, + board->focussed == OBJ_BOARD ) ) { + XP_Bool allDrawn = XP_TRUE; XP_S16 lastCol, lastRow, i; ModelCtxt* model = board->model; BlankQueue bq; - draw_boardBegin( board->draw, &board->boardBounds, - board->focussed == OBJ_BOARD ); scrollIfCan( board ); /* this must happen before we count blanks since it invalidates squares */ @@ -1400,6 +1404,8 @@ board_requestHint( BoardCtxt* board, XP_U16 nTilesToUse, XP_Bool* workRemainsP ) regardless where its contents are? */ if ( model_getCurrentMoveCount( model, selPlayer ) > 0 ) { model_resetCurrentTurn( model, selPlayer ); + /* Draw's a no-op on Wince with a null hdc, but it'll draw + again.*/ board_draw( board ); }