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).
This commit is contained in:
parent
afb06b51cc
commit
c847522422
16 changed files with 43 additions and 137 deletions
|
@ -52,40 +52,5 @@ void BaseBackend::fillScreen(uint32 col) {
|
|||
unlockScreen();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
FIXME: Maybe we should push the default config file loading/saving code below
|
||||
out to all the backends?
|
||||
*/
|
||||
|
||||
|
||||
#if defined(POSIX)
|
||||
#define DEFAULT_CONFIG_FILE ".scummvmrc"
|
||||
#endif
|
||||
|
||||
#if !defined(POSIX)
|
||||
#define DEFAULT_CONFIG_FILE "scummvm.ini"
|
||||
#endif
|
||||
|
||||
BaseBackend::BaseBackend() {
|
||||
}
|
||||
|
||||
BaseBackend::~BaseBackend() {
|
||||
}
|
||||
|
||||
Common::SeekableReadStream *BaseBackend::createConfigReadStream() {
|
||||
Common::FSNode file(DEFAULT_CONFIG_FILE);
|
||||
return file.createReadStream();
|
||||
}
|
||||
|
||||
Common::WriteStream *BaseBackend::createConfigWriteStream() {
|
||||
#ifdef __DC__
|
||||
return 0;
|
||||
#else
|
||||
Common::FSNode file(DEFAULT_CONFIG_FILE);
|
||||
return file.createWriteStream();
|
||||
#endif
|
||||
}
|
||||
|
||||
void BaseBackend::resetGraphicsScale() {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue