aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2/savefilemgr.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2012-05-21 21:21:48 +0300
committerFilippos Karapetis2012-06-21 10:48:03 +0300
commite10e412bba99090b67a99cd7fddd5405172452f1 (patch)
treef6883df79a535de2748e0fa990740017b24a8e93 /backends/platform/ps2/savefilemgr.cpp
parent82a553a12c033489939c031bb104e37e77ee0797 (diff)
downloadscummvm-rg350-e10e412bba99090b67a99cd7fddd5405172452f1.tar.gz
scummvm-rg350-e10e412bba99090b67a99cd7fddd5405172452f1.tar.bz2
scummvm-rg350-e10e412bba99090b67a99cd7fddd5405172452f1.zip
COMMON: Allow the savefile manager to create uncompressed saves
These are useful in cases where the files can be used in the original interpreters (such as the exported characters from QFG), in order to avoid confusion in cases where the users are unaware that these saves are compressed and are trying to load them in the original interpreters.
Diffstat (limited to 'backends/platform/ps2/savefilemgr.cpp')
-rw-r--r--backends/platform/ps2/savefilemgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp
index 421edc3e2e..46af42e193 100644
--- a/backends/platform/ps2/savefilemgr.cpp
+++ b/backends/platform/ps2/savefilemgr.cpp
@@ -145,7 +145,7 @@ Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &fil
return Common::wrapCompressedReadStream(sf);
}
-Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename) {
+Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename, bool compress) {
Common::FSNode savePath(ConfMan.get("savepath")); // TODO: is this fast?
Common::WriteStream *sf;
@@ -193,7 +193,7 @@ Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &fil
}
_screen->wantAnim(false);
- return Common::wrapCompressedWriteStream(sf);
+ return compress ? Common::wrapCompressedWriteStream(sf) : sf;
}
bool Ps2SaveFileManager::removeSavefile(const Common::String &filename) {