mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
HACK: if gi's notion of gameID is out of sync, force it in (logging
the fact). I'm not sure why but this is required sometimes on Android.
This commit is contained in:
parent
339ec66844
commit
d78a4979da
1 changed files with 21 additions and 3 deletions
|
@ -1191,9 +1191,27 @@ gameID( const CommsCtxt* comms )
|
|||
if ( 0 == gameID ) {
|
||||
gameID = comms->util->gameInfo->gameID;
|
||||
}
|
||||
XP_ASSERT( 0 == comms->connID
|
||||
|| (comms->connID & 0xFFFF)
|
||||
== (comms->util->gameInfo->gameID & 0xFFFF) );
|
||||
// XP_ASSERT( 0 != gameID );
|
||||
if ( 0 == gameID ) {
|
||||
XP_LOGF( "%s: gameID STILL 0", __func__ );
|
||||
} else if ( 0 == comms->util->gameInfo->gameID ) {
|
||||
XP_LOGF( "%s: setting gi's gameID to 0X%lX", __func__, gameID );
|
||||
comms->util->gameInfo->gameID = gameID;
|
||||
}
|
||||
|
||||
/* this next is failing on android b/c comms->util->gameInfo->gameID still 0 */
|
||||
#ifdef DEBUG
|
||||
/* if ( (0 != comms->connID) */
|
||||
/* && ((comms->connID & 0xFFFF) */
|
||||
/* != (comms->util->gameInfo->gameID & 0xFFFF)) ) { */
|
||||
/* XP_LOGF("%s: connID: 0X%lX vs gameID: 0X%lX", __func__, comms->connID, */
|
||||
/* comms->util->gameInfo->gameID ); */
|
||||
/* XP_ASSERT(0); */
|
||||
/* } */
|
||||
#endif
|
||||
/* XP_ASSERT( 0 == comms->connID */
|
||||
/* || (comms->connID & 0xFFFF) */
|
||||
/* == (comms->util->gameInfo->gameID & 0xFFFF) ); */
|
||||
/* Most of the time these will be the same, but early in a game they won't
|
||||
be. Would be nice not to have to use gameID. */
|
||||
return gameID;
|
||||
|
|
Loading…
Reference in a new issue