mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
abort draw quickly if platform can't
This commit is contained in:
parent
7ed1d9b45f
commit
f2ada15241
1 changed files with 10 additions and 4 deletions
|
@ -467,8 +467,11 @@ board_commitTurn( BoardCtxt* board )
|
||||||
if ( !legal || board->badWordRejected ) {
|
if ( !legal || board->badWordRejected ) {
|
||||||
result = XP_FALSE;
|
result = XP_FALSE;
|
||||||
} else {
|
} 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 );
|
result = board_hideTray( board );
|
||||||
|
|
||||||
if ( util_userQuery( board->util, QUERY_COMMIT_TURN,
|
if ( util_userQuery( board->util, QUERY_COMMIT_TURN,
|
||||||
stream ) ) {
|
stream ) ) {
|
||||||
result = server_commitMove( board->server ) || result;
|
result = server_commitMove( board->server ) || result;
|
||||||
|
@ -880,14 +883,15 @@ board_draw( BoardCtxt* board )
|
||||||
{
|
{
|
||||||
drawScoreBoard( 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_Bool allDrawn = XP_TRUE;
|
||||||
XP_S16 lastCol, lastRow, i;
|
XP_S16 lastCol, lastRow, i;
|
||||||
ModelCtxt* model = board->model;
|
ModelCtxt* model = board->model;
|
||||||
BlankQueue bq;
|
BlankQueue bq;
|
||||||
|
|
||||||
draw_boardBegin( board->draw, &board->boardBounds,
|
|
||||||
board->focussed == OBJ_BOARD );
|
|
||||||
|
|
||||||
scrollIfCan( board ); /* this must happen before we count blanks
|
scrollIfCan( board ); /* this must happen before we count blanks
|
||||||
since it invalidates squares */
|
since it invalidates squares */
|
||||||
|
@ -1400,6 +1404,8 @@ board_requestHint( BoardCtxt* board, XP_U16 nTilesToUse, XP_Bool* workRemainsP )
|
||||||
regardless where its contents are? */
|
regardless where its contents are? */
|
||||||
if ( model_getCurrentMoveCount( model, selPlayer ) > 0 ) {
|
if ( model_getCurrentMoveCount( model, selPlayer ) > 0 ) {
|
||||||
model_resetCurrentTurn( model, selPlayer );
|
model_resetCurrentTurn( model, selPlayer );
|
||||||
|
/* Draw's a no-op on Wince with a null hdc, but it'll draw
|
||||||
|
again.*/
|
||||||
board_draw( board );
|
board_draw( board );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue