aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
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/sky
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/sky')
-rw-r--r--engines/sky/control.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 172891643b..e4b60629d0 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -1138,7 +1138,7 @@ void Control::saveDescriptions(uint8 *srcBuf) {
bool ioFailed = true;
if (outf) {
outf->write(tmpBuf, tmpPos - tmpBuf);
- outf->flush();
+ outf->finalize();
if (!outf->ioFailed())
ioFailed = false;
delete outf;
@@ -1165,7 +1165,7 @@ void Control::doAutoSave(void) {
uint32 fSize = prepareSaveData(saveData);
outf->write(saveData, fSize);
- outf->flush();
+ outf->finalize();
if (outf->ioFailed())
displayMessage(0, "Unable to write autosave file '%s' in directory '%s'. Disk full?", fName, _saveFileMan->getSavePath());
@@ -1187,7 +1187,7 @@ uint16 Control::saveGameToFile(void) {
uint32 fSize = prepareSaveData(saveData);
uint32 writeRes = outf->write(saveData, fSize);
- outf->flush();
+ outf->finalize();
if (outf->ioFailed())
writeRes = 0;
free(saveData);