aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMarcus Comstedt2005-10-13 18:50:53 +0000
committerMarcus Comstedt2005-10-13 18:50:53 +0000
commit57e1c6451dc928f4162de019486e3af259d39423 (patch)
treeccf84f9e49be23c03cac986490c05f6b94c0b555 /common
parent66fbe2d3c42355d714fd1cd638323f367de4c329 (diff)
downloadscummvm-rg350-57e1c6451dc928f4162de019486e3af259d39423.tar.gz
scummvm-rg350-57e1c6451dc928f4162de019486e3af259d39423.tar.bz2
scummvm-rg350-57e1c6451dc928f4162de019486e3af259d39423.zip
Improved savefile error handling:
* New flush() method in WriteStream class to flush pending I/O, in order to detect any I/O errors * Use of flush() and ioFailed() added to scumm engine save function * Dreamcast backend extended to support the new checks svn-id: r19066
Diffstat (limited to 'common')
-rw-r--r--common/stream.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/stream.h b/common/stream.h
index a89e5475dd..32688e08ff 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -67,6 +67,12 @@ public:
*/
virtual uint32 write(const void *dataPtr, uint32 dataSize) = 0;
+ /**
+ * Commit any buffered data to the underlying channel or
+ * storage medium; unbuffered streams can use the default
+ * implementation.
+ */
+ virtual void flush() {}
// The remaining methods all have default implementations; subclasses
// need not (and should not) overload them.