diff options
author | Max Horn | 2011-06-06 15:30:21 +0200 |
---|---|---|
committer | Max Horn | 2011-06-06 15:30:21 +0200 |
commit | c8475224221ed14590ad08929a1cadd6e8e3cc4e (patch) | |
tree | 54c3bd35cd63e81246b10ff9213217335f928118 /common/system.h | |
parent | afb06b51cceb96cf3ac2baae1f562c673114d108 (diff) | |
download | scummvm-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 'common/system.h')
-rw-r--r-- | common/system.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/system.h b/common/system.h index 4b85f143b7..85771cf982 100644 --- a/common/system.h +++ b/common/system.h @@ -1015,7 +1015,7 @@ public: * ReadStream instance. It is the callers responsiblity to delete * the stream after use. */ - virtual Common::SeekableReadStream *createConfigReadStream() = 0; + virtual Common::SeekableReadStream *createConfigReadStream(); /** * Open the default config file for writing, by returning a suitable @@ -1024,7 +1024,14 @@ public: * * May return 0 to indicate that writing to config file is not possible. */ - virtual Common::WriteStream *createConfigWriteStream() = 0; + virtual Common::WriteStream *createConfigWriteStream(); + + /** + * Get the default file name (or even path) where the user configuration + * of ScummVM will be saved. + * Note that not all ports may use this. + */ + virtual Common::String getDefaultConfigFileName(); /** * Logs a given message. |