aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/ds')
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp13
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.h3
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h3
4 files changed, 18 insertions, 3 deletions
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index ef6091e2a2..9991a3253a 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -45,6 +45,17 @@ static Common::String getSavePath() {
// GBAMP Save File Manager
//////////////////////////
+void GBAMPSaveFileManager::updateSavefilesList(Common::StringArray &lockedFiles) {
+ // TODO: implement this
+ // in this method manager should remember lockedFiles
+ // these files must not be opened for loading or saving, or listed by listSavefiles()
+}
+
+Common::InSaveFile *GBAMPSaveFileManager::openRawFile(const Common::String &filename) {
+ // TODO: make sure it returns raw file, not uncompressed save contents
+ return openForLoading(filename);
+}
+
Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &filename, bool compress) {
Common::String fileSpec = getSavePath();
if (fileSpec.lastChar() != '/')
@@ -56,7 +67,7 @@ Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &f
Common::WriteStream *stream = DS::DSFileStream::makeFromPath(fileSpec, true);
// Use a write buffer
stream = Common::wrapBufferedWriteStream(stream, SAVE_BUFFER_SIZE);
- return stream;
+ return new Common::OutSaveFile(stream);
}
Common::InSaveFile *GBAMPSaveFileManager::openForLoading(const Common::String &filename) {
diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h
index d86db2ec70..065ea7de68 100644
--- a/backends/platform/ds/arm9/source/gbampsave.h
+++ b/backends/platform/ds/arm9/source/gbampsave.h
@@ -27,6 +27,9 @@
class GBAMPSaveFileManager : public Common::SaveFileManager {
public:
+ virtual void updateSavefilesList(Common::StringArray &lockedFiles);
+ virtual Common::InSaveFile *openRawFile(const Common::String &filename);
+
virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true);
virtual Common::InSaveFile *openForLoading(const Common::String &filename);
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index c53f57523d..f23192cd9d 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -715,7 +715,7 @@ void OSystem_DS::deleteMutex(MutexRef mutex) {
// and should be replaced by an AudioCDManager subclass,
// see backends/audiocd/ and common/system.h
-bool OSystem_DS::openCD(int drive) {
+bool OSystem_DS::openCD() {
return DS::CD::checkCD();
}
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index f4dbac66f7..9f73e125c2 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -130,7 +130,8 @@ public:
// FIXME/TODO: The CD API as follows is *obsolete*
// and should be replaced by an AudioCDManager subclass,
// see backends/audiocd/ and common/system.h
- virtual bool openCD(int drive);
+ virtual bool openCD();
+ virtual void closeCD() {}
virtual bool pollCD();
virtual void playCD(int track, int num_loops, int start_frame, int duration);
virtual void stopCD();