aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2
diff options
context:
space:
mode:
authorMax Horn2011-06-06 15:30:21 +0200
committerMax Horn2011-06-06 15:30:21 +0200
commitc8475224221ed14590ad08929a1cadd6e8e3cc4e (patch)
tree54c3bd35cd63e81246b10ff9213217335f928118 /backends/platform/ps2
parentafb06b51cceb96cf3ac2baae1f562c673114d108 (diff)
downloadscummvm-rg350-c8475224221ed14590ad08929a1cadd6e8e3cc4e.tar.gz
scummvm-rg350-c8475224221ed14590ad08929a1cadd6e8e3cc4e.tar.bz2
scummvm-rg350-c8475224221ed14590ad08929a1cadd6e8e3cc4e.zip
BACKENDS: Add OSystem::getDefaultConfigFileName
This is used to provide default implementations for createConfigWriteStream and createConfigReadStream, which can be used by most backends. Note that backends can still override createConfigRead/WriteStream; this could be useful if settings on some port are not stored in a regular file (think 'Windows registry', for a hypothetical example).
Diffstat (limited to 'backends/platform/ps2')
-rw-r--r--backends/platform/ps2/systemps2.cpp10
-rw-r--r--backends/platform/ps2/systemps2.h3
2 files changed, 3 insertions, 10 deletions
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index aa1a9ade9f..9dc3f639d7 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -983,12 +983,6 @@ void OSystem_PS2::makeConfigPath() {
_configFile = strdup(path);
}
-Common::SeekableReadStream *OSystem_PS2::createConfigReadStream() {
- Common::FSNode file(_configFile);
- return file.createReadStream();
-}
-
-Common::WriteStream *OSystem_PS2::createConfigWriteStream() {
- Common::FSNode file(_configFile);
- return file.createWriteStream();
+Common::String OSystem_PS2::getDefaultConfigFileName() {
+ return _configFile
}
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index b21a56c184..bbb82940c8 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -112,8 +112,7 @@ public:
virtual void quit();
- virtual Common::SeekableReadStream *createConfigReadStream();
- virtual Common::WriteStream *createConfigWriteStream();
+ virtual Common::String getDefaultConfigFileName();
virtual Graphics::PixelFormat getOverlayFormat() const;
virtual Common::SaveFileManager *getSavefileManager();