diff --git a/xwords4/common/game.c b/xwords4/common/game.c index d5d74f1f0..ce259f4e7 100644 --- a/xwords4/common/game.c +++ b/xwords4/common/game.c @@ -438,7 +438,7 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi ) } gi->gameID = stream_getU16( stream ); - if ( gi->timerEnabled ) { + if ( gi->timerEnabled || strVersion >= STREAM_VERS_GAMESECONDS ) { gi->gameSeconds = stream_getU16( stream ); } @@ -481,9 +481,7 @@ gi_writeToStream( XWStreamCtxt* stream, const CurGameInfo* gi ) stream_putBits( stream, 1, gi->confirmBTConnect ); stream_putU16( stream, gi->gameID ); - if ( gi->timerEnabled) { - stream_putU16( stream, gi->gameSeconds ); - } + stream_putU16( stream, gi->gameSeconds ); for ( pl = gi->players, i = 0; i < gi->nPlayers; ++pl, ++i ) { stringToStream( stream, pl->name ); diff --git a/xwords4/common/game.h b/xwords4/common/game.h index e62d18c8a..3ad542de3 100644 --- a/xwords4/common/game.h +++ b/xwords4/common/game.h @@ -31,6 +31,8 @@ extern "C" { #endif +#define STREAM_VERS_GAMESECONDS 0x0B /* save gameSeconds whether or not + timer's enabled */ #define STREAM_VERS_4YOFFSET 0x0A /* 4 bits for yOffset on board */ #define STREAM_VERS_CHANNELSEED 0x09 /* new short in relay connect must be saved in comms */ @@ -44,7 +46,7 @@ extern "C" { #define STREAM_VERS_41B4 0x02 #define STREAM_VERS_405 0x01 -#define CUR_STREAM_VERS STREAM_VERS_4YOFFSET +#define CUR_STREAM_VERS STREAM_VERS_GAMESECONDS typedef struct LocalPlayer { XP_UCHAR* name;