mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
use new mem_stream_make_sized
This commit is contained in:
parent
5c683f173a
commit
761f93dd7e
2 changed files with 6 additions and 4 deletions
|
@ -248,15 +248,16 @@ saveGame( CommonGlobals* cGlobals )
|
|||
if ( doSave ) {
|
||||
XWStreamCtxt* outStream;
|
||||
|
||||
outStream = mem_stream_make( cGlobals->params->util->mpool,
|
||||
cGlobals->params->vtMgr,
|
||||
cGlobals, 0, writeToFile );
|
||||
outStream = mem_stream_make_sized( cGlobals->params->util->mpool,
|
||||
cGlobals->params->vtMgr,
|
||||
cGlobals->lastStreamSize,
|
||||
cGlobals, 0, writeToFile );
|
||||
stream_open( outStream );
|
||||
|
||||
game_saveToStream( &cGlobals->game,
|
||||
&cGlobals->params->gi,
|
||||
outStream, ++cGlobals->curSaveToken );
|
||||
|
||||
cGlobals->lastStreamSize = stream_getSize( outStream );
|
||||
stream_destroy( outStream );
|
||||
|
||||
game_saveSucceeded( &cGlobals->game, cGlobals->curSaveToken );
|
||||
|
|
|
@ -163,6 +163,7 @@ struct CommonGlobals {
|
|||
|
||||
XWGame game;
|
||||
XP_U16 lastNTilesToUse;
|
||||
XP_U16 lastStreamSize;
|
||||
|
||||
SocketChangedFunc socketChanged;
|
||||
void* socketChangedClosure;
|
||||
|
|
Loading…
Reference in a new issue