diff options
author | Max Horn | 2007-02-17 18:55:51 +0000 |
---|---|---|
committer | Max Horn | 2007-02-17 18:55:51 +0000 |
commit | b8aeefaffb2ecdc9da5594a49cfba87a84e55d4e (patch) | |
tree | 4115d12166111ec170729e268f9161dd5b6b2009 /engines/gob/gob.cpp | |
parent | 7d5d6c2f91287a286a65fe652c62462dce9b2e62 (diff) | |
download | scummvm-rg350-b8aeefaffb2ecdc9da5594a49cfba87a84e55d4e.tar.gz scummvm-rg350-b8aeefaffb2ecdc9da5594a49cfba87a84e55d4e.tar.bz2 scummvm-rg350-b8aeefaffb2ecdc9da5594a49cfba87a84e55d4e.zip |
Added finalize() method to Common::OutSaveFile (which by default just flushes the stream), changed engines to call that before deleting OutSaveFile instances (instead of just flushing)
svn-id: r25660
Diffstat (limited to 'engines/gob/gob.cpp')
-rw-r--r-- | engines/gob/gob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index f1fcb47239..89a761dcdc 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -295,7 +295,7 @@ void GobEngine::saveGameData(enum SaveFiles sFile, int16 dataVar, int32 size, in retSize = writeDataEndian(*out, buf, _global->_inter_variablesSizes + dataVar, size); - out->flush(); + out->finalize(); if (out->ioFailed() || (retSize != size)) warning("Can't write file \"%s\"", sName); @@ -329,7 +329,7 @@ bool GobEngine::saveGame(int saveSlot, int16 dataVar, int32 size, int32 offset) } writeDataEndian(*out, _saveIndex + saveSlot * 40, _saveIndexSizes + saveSlot * 40, 40); writeDataEndian(*out, varBuf, sizeBuf, size); - out->flush(); + out->finalize(); if (out->ioFailed()) { warning("Can't save to slot %d", saveSlot); return false; |