aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-06-07 13:06:21 +0200
committerMax Horn2011-06-07 14:57:58 +0200
commit997f0a190083d9fcca743c95e8aca03e261b0f1c (patch)
treeb85cfc760052f257d914806210694991a962bf4b
parent98db614cd81c44f04345e697912b5904ebaa9af4 (diff)
downloadscummvm-rg350-997f0a190083d9fcca743c95e8aca03e261b0f1c.tar.gz
scummvm-rg350-997f0a190083d9fcca743c95e8aca03e261b0f1c.tar.bz2
scummvm-rg350-997f0a190083d9fcca743c95e8aca03e261b0f1c.zip
BACKENDS: All backends use _savefileManager now, adapt OSystem accordingly
-rw-r--r--common/system.cpp13
-rw-r--r--common/system.h4
2 files changed, 11 insertions, 6 deletions
diff --git a/common/system.cpp b/common/system.cpp
index 6be7775b05..27baea59f9 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -77,8 +77,16 @@ void OSystem::initBackend() {
error("Backend failed to instantiate event manager");
if (!_timerManager)
error("Backend failed to instantiate timer manager");
+
+ // TODO: We currently don't check _savefileManager, because at least
+ // on the Nintendo DS, it is possible that none is set. That should
+ // probably be treated as "saving is not possible". Or else the NDS
+ // port needs to be changed to always set a _savefileManager
// if (!_savefileManager)
// error("Backend failed to instantiate savefile manager");
+
+ // TODO: We currently don't check _fsFactory because not all ports
+ // set it.
// if (!_fsFactory)
// error("Backend failed to instantiate fs factory");
}
@@ -109,11 +117,6 @@ void OSystem::fatalError() {
exit(1);
}
-Common::SaveFileManager *OSystem::getSavefileManager() {
- assert(_savefileManager);
- return _savefileManager;
-}
-
FilesystemFactory *OSystem::getFilesystemFactory() {
assert(_fsFactory);
return _fsFactory;
diff --git a/common/system.h b/common/system.h
index 6b21ae4b82..0d0ffda1e0 100644
--- a/common/system.h
+++ b/common/system.h
@@ -1042,7 +1042,9 @@ public:
* and other modifiable persistent game data. For more information,
* refer to the SaveFileManager documentation.
*/
- virtual Common::SaveFileManager *getSavefileManager();
+ inline Common::SaveFileManager *getSavefileManager() {
+ return _savefileManager;
+ }
/**
* Returns the FilesystemFactory object, depending on the current architecture.