try to make linux client mimic Android a bit better in saving after

any network activity so messages get acked more quickly.
This commit is contained in:
Eric House 2012-11-13 06:15:36 -08:00
parent 43b1e219f3
commit 2908802017
2 changed files with 7 additions and 2 deletions

View file

@ -111,6 +111,7 @@ DEFINES += -DXWFEATURE_HILITECELL
# allow change dict inside running game
DEFINES += -DXWFEATURE_CHANGEDICT
DEFINES += -DXWFEATURE_DEVID
DEFINES += -DXWFEATURE_COMMSACK
# MAX_ROWS controls STREAM_VERS_BIGBOARD and with it move hashing
DEFINES += -DMAX_ROWS=32

View file

@ -474,6 +474,7 @@ onetime_idle( gpointer data )
if ( !!globals->cGlobals.game.board ) {
board_draw( globals->cGlobals.game.board );
}
saveGame( &globals->cGlobals );
}
return FALSE;
}
@ -1219,7 +1220,7 @@ static XP_Bool
blocking_gotEvent( CursesAppGlobals* globals, int* ch )
{
XP_Bool result = XP_FALSE;
int numEvents;
int numEvents, ii;
short fdIndex;
XP_Bool redraw = XP_FALSE;
@ -1334,12 +1335,15 @@ blocking_gotEvent( CursesAppGlobals* globals, int* ch )
}
}
redraw = server_do( globals->cGlobals.game.server, NULL ) || redraw;
for ( ii = 0; ii < 5; ++ii ) {
redraw = server_do( globals->cGlobals.game.server, NULL ) || redraw;
}
if ( redraw ) {
/* messages change a lot */
board_invalAll( globals->cGlobals.game.board );
board_draw( globals->cGlobals.game.board );
}
saveGame( globals->cGlobals );
}
return result;
} /* blocking_gotEvent */