diff options
author | Filippos Karapetis | 2012-06-25 22:39:28 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-25 22:39:28 +0300 |
commit | 659d0cfcc39721001f607e4ca51b8eb477708404 (patch) | |
tree | 51c1168bd08157bd22d3353efa7b66b6299d8112 | |
parent | 16adcb5145ce293af120b7cc828a08166da310e2 (diff) | |
download | scummvm-rg350-659d0cfcc39721001f607e4ca51b8eb477708404.tar.gz scummvm-rg350-659d0cfcc39721001f607e4ca51b8eb477708404.tar.bz2 scummvm-rg350-659d0cfcc39721001f607e4ca51b8eb477708404.zip |
COMMON: Also adapt openForSaving() in the DC and N64 backends
-rw-r--r-- | backends/platform/dc/vmsave.cpp | 5 | ||||
-rw-r--r-- | backends/platform/n64/framfs_save_manager.h | 4 | ||||
-rw-r--r-- | backends/platform/n64/pakfs_save_manager.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index e06dd7fa43..ba3b787942 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -316,8 +316,9 @@ public: class VMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { - return Common::wrapCompressedWriteStream(new OutVMSave(filename.c_str())); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { + OutVMSave *s = new OutVMSave(filename.c_str()); + return compress ? Common::wrapCompressedWriteStream(s) : s; } virtual Common::InSaveFile *openForLoading(const Common::String &filename) { diff --git a/backends/platform/n64/framfs_save_manager.h b/backends/platform/n64/framfs_save_manager.h index da553e423a..0a88c8666b 100644 --- a/backends/platform/n64/framfs_save_manager.h +++ b/backends/platform/n64/framfs_save_manager.h @@ -100,10 +100,10 @@ public: class FRAMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutFRAMSave *s = new OutFRAMSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return 0; diff --git a/backends/platform/n64/pakfs_save_manager.h b/backends/platform/n64/pakfs_save_manager.h index e0fcbc1e2d..6e67fb0f5f 100644 --- a/backends/platform/n64/pakfs_save_manager.h +++ b/backends/platform/n64/pakfs_save_manager.h @@ -101,10 +101,10 @@ public: class PAKSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutPAKSave *s = new OutPAKSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return NULL; |