[Scummvm-git-logs] scummvm master -> 489489b12768a94505ce5605bb811a549b32b1df
Tkachov
Tkachov at users.noreply.github.com
Wed Aug 31 09:15:33 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
489489b127 PS2: Fix Ps2SaveFileManager
Commit: 489489b12768a94505ce5605bb811a549b32b1df
https://github.com/scummvm/scummvm/commit/489489b12768a94505ce5605bb811a549b32b1df
Author: Alexander Tkachev (alexander at tkachov.ru)
Date: 2016-08-31T14:12:45+06:00
Commit Message:
PS2: Fix Ps2SaveFileManager
* updateSavefilesList() stub;
* openRawFile();
* Common::OutSaveFile in openForLoading().
Changed paths:
backends/platform/ps2/savefilemgr.cpp
backends/platform/ps2/savefilemgr.h
diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp
index 569d0e1..4cd9880 100644
--- a/backends/platform/ps2/savefilemgr.cpp
+++ b/backends/platform/ps2/savefilemgr.cpp
@@ -82,7 +82,11 @@ void Ps2SaveFileManager::mcSplit(char *full, char *game, char *ext) {
// TODO
}
-Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &filename) {
+void Ps2SaveFileManager::updateSavefilesList(Common::StringArray &lockedFiles) {
+ // TODO: implement this (locks files, preventing them from being listed, saved or loaded)
+}
+
+Common::InSaveFile *Ps2SaveFileManager::openRawFile(const Common::String &filename) {
Common::FSNode savePath(ConfMan.get("savepath")); // TODO: is this fast?
Common::SeekableReadStream *sf;
@@ -141,7 +145,12 @@ Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &fil
// _screen->wantAnim(false);
- return Common::wrapCompressedReadStream(sf);
+ return sf;
+}
+
+Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &filename) {
+ Common::SeekableReadStream *sf = openRawFile(filename);
+ return (sf == NULL ? NULL : Common::wrapCompressedReadStream(sf));
}
Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename, bool compress) {
@@ -192,7 +201,7 @@ Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &fil
}
_screen->wantAnim(false);
- return new OutSaveFile(compress ? Common::wrapCompressedWriteStream(sf) : sf);
+ return new Common::OutSaveFile(compress ? Common::wrapCompressedWriteStream(sf) : sf);
}
bool Ps2SaveFileManager::removeSavefile(const Common::String &filename) {
diff --git a/backends/platform/ps2/savefilemgr.h b/backends/platform/ps2/savefilemgr.h
index 547f16f..3d45382 100644
--- a/backends/platform/ps2/savefilemgr.h
+++ b/backends/platform/ps2/savefilemgr.h
@@ -34,6 +34,9 @@ public:
Ps2SaveFileManager(OSystem_PS2 *system, Gs2dScreen *screen);
virtual ~Ps2SaveFileManager();
+ virtual void updateSavefilesList(Common::StringArray &lockedFiles);
+ virtual Common::InSaveFile *openRawFile(const Common::String &filename);
+
virtual Common::InSaveFile *openForLoading(const Common::String &filename);
virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true);
virtual Common::StringArray listSavefiles(const Common::String &pattern);
More information about the Scummvm-git-logs
mailing list