diff options
author | Gregory Montoir | 2005-11-01 13:56:11 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-11-01 13:56:11 +0000 |
commit | e763d1e060b9652923474fad620d6672bce4d120 (patch) | |
tree | 7fe27882a8a52e85ca692de167eaafd64dc35a9e | |
parent | 29722f03d377c990f5fb5715141553ebd874e2b9 (diff) | |
download | scummvm-rg350-e763d1e060b9652923474fad620d6672bce4d120.tar.gz scummvm-rg350-e763d1e060b9652923474fad620d6672bce4d120.tar.bz2 scummvm-rg350-e763d1e060b9652923474fad620d6672bce4d120.zip |
added OutSaveFile::flush() / OutSaveFile::ioFailed() to check for errors.
svn-id: r19385
-rw-r--r-- | queen/queen.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/queen/queen.cpp b/queen/queen.cpp index 2445aeeb8d..dc9f163c9a 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -277,7 +277,11 @@ void QueenEngine::saveGameState(uint16 slot, const char *desc) { file->write(&header, sizeof(header)); // write save data - if (file->write(saveData, dataSize) != dataSize) { + file->write(saveData, dataSize); + file->flush(); + + // check for errors + if (file->ioFailed()) { warning("Can't write file '%s'. (Disk full?)", name); } delete[] saveData; |