aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9
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/ds/arm9
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/ds/arm9')
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp12
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h3
2 files changed, 3 insertions, 12 deletions
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index e65402c604..90af02f43b 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -853,16 +853,8 @@ void OSystem_DS::setCharactersEntered(int count) {
DS::setCharactersEntered(count);
}
-Common::SeekableReadStream *OSystem_DS::createConfigReadStream() {
- Common::FSNode file(DEFAULT_CONFIG_FILE);
-// consolePrintf("R %s", DEFAULT_CONFIG_FILE);
- return file.createReadStream();
-}
-
-Common::WriteStream *OSystem_DS::createConfigWriteStream() {
- Common::FSNode file(DEFAULT_CONFIG_FILE);
-// consolePrintf("W %s", DEFAULT_CONFIG_FILE);
- return file.createWriteStream();
+Common::String OSystem_DS::getDefaultConfigFileName() {
+ return DEFAULT_CONFIG_FILE;
}
u16 OSystem_DS::applyGamma(u16 color) {
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index ecb8011060..d3e7fce1a1 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -176,8 +176,7 @@ public:
void refreshCursor();
- Common::WriteStream *createConfigWriteStream();
- Common::SeekableReadStream *createConfigReadStream();
+ virtual Common::String getDefaultConfigFileName();
u16 applyGamma(u16 color);
void setGammaValue(int gamma) { _gammaValue = gamma; }