aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2007-02-17 18:55:51 +0000
committerMax Horn2007-02-17 18:55:51 +0000
commitb8aeefaffb2ecdc9da5594a49cfba87a84e55d4e (patch)
tree4115d12166111ec170729e268f9161dd5b6b2009 /engines/sword1
parent7d5d6c2f91287a286a65fe652c62462dce9b2e62 (diff)
downloadscummvm-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/sword1')
-rw-r--r--engines/sword1/control.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 85e25c75fc..d40c76eb89 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -763,7 +763,7 @@ void Control::writeSavegameDescriptions(void) {
else
outf->writeByte(255);
}
- outf->flush();
+ outf->finalize();
if (outf->ioFailed())
displayMessage(0, "Can't write to SAVEGAME.INF in directory '%s'. Device full?", _saveFileMan->getSavePath());
delete outf;
@@ -958,7 +958,7 @@ void Control::saveGameToFile(uint8 slot) {
uint32 *playerRaw = (uint32*)cpt;
for (uint32 cnt2 = 0; cnt2 < playerSize; cnt2++)
outf->writeUint32LE(playerRaw[cnt2]);
- outf->flush();
+ outf->finalize();
if (outf->ioFailed())
displayMessage(0, "Couldn't write to file '%s' in directory '%s'. Device full?", fName, _saveFileMan->getSavePath());
delete outf;