aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/null
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-02 13:13:02 +0000
committerJohannes Schickel2008-09-02 13:13:02 +0000
commitd093a631333f34b1d61754388e43a5fcb6f40ea3 (patch)
treec75cdd68e2b560862d14719c1ec892308fdbc4cf /backends/platform/null
parent3ea8f70792b62c70bfcae97b970e3830d85c5d72 (diff)
downloadscummvm-rg350-d093a631333f34b1d61754388e43a5fcb6f40ea3.tar.gz
scummvm-rg350-d093a631333f34b1d61754388e43a5fcb6f40ea3.tar.bz2
scummvm-rg350-d093a631333f34b1d61754388e43a5fcb6f40ea3.zip
Updated NULL backend for FS changes.
svn-id: r34277
Diffstat (limited to 'backends/platform/null')
-rw-r--r--backends/platform/null/null.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 463e9d7b2d..a2696e44bc 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -50,13 +50,12 @@
#include "backends/fs/windows/windows-fs-factory.h"
#endif
-
-
class OSystem_NULL : public OSystem {
protected:
Common::SaveFileManager *_savefile;
Audio::MixerImpl *_mixer;
Common::TimerManager *_timer;
+ FilesystemFactory *_fsFactory;
timeval _startTime;
public:
@@ -133,12 +132,23 @@ OSystem_NULL::OSystem_NULL() {
_savefile = 0;
_mixer = 0;
_timer = 0;
+
+ #if defined(__amigaos4__)
+ _fsFactory = new AmigaOSFilesystemFactory();
+ #elif defined(UNIX)
+ _fsFactory = new POSIXFilesystemFactory();
+ #elif defined(WIN32)
+ _fsFactory = new WindowsFilesystemFactory();
+ #else
+ #error Unknown and unsupported FS backend
+ #endif
}
OSystem_NULL::~OSystem_NULL() {
delete _savefile;
delete _mixer;
delete _timer;
+ delete _fsFactory;
}
void OSystem_NULL::initBackend() {
@@ -327,18 +337,9 @@ void OSystem_NULL::getTimeAndDate(struct tm &t) const {
}
FilesystemFactory *OSystem_NULL::getFilesystemFactory() {
- #if defined(__amigaos4__)
- return &AmigaOSFilesystemFactory::instance();
- #elif defined(UNIX)
- return &POSIXFilesystemFactory::instance();
- #elif defined(WIN32)
- return &WindowsFilesystemFactory::instance();
- #else
- #error Unknown and unsupported backend in OSystem_NULL::getFilesystemFactory
- #endif
+ return _fsFactory;
}
-
OSystem *OSystem_NULL_create() {
return new OSystem_NULL();
}