From b8aeefaffb2ecdc9da5594a49cfba87a84e55d4e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 17 Feb 2007 18:55:51 +0000 Subject: 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 --- engines/sword1/control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sword1') 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; -- cgit v1.2.3