aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorMax Horn2008-03-11 17:24:34 +0000
committerMax Horn2008-03-11 17:24:34 +0000
commit3afe9c0b9ee24a5c0389f338affc1612e3d19675 (patch)
tree40d5c6bb22a645c957e84ca5043fb594472046d5 /backends/platform
parent4f30f09456cd672797e69d574888a65dd60dedce (diff)
downloadscummvm-rg350-3afe9c0b9ee24a5c0389f338affc1612e3d19675.tar.gz
scummvm-rg350-3afe9c0b9ee24a5c0389f338affc1612e3d19675.tar.bz2
scummvm-rg350-3afe9c0b9ee24a5c0389f338affc1612e3d19675.zip
Added OSystem_SDL::getFilesystemFactory()
svn-id: r31107
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/sdl.cpp28
-rw-r--r--backends/platform/sdl/sdl.h1
2 files changed, 29 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 5ef31f9253..6b785f2409 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -38,6 +38,20 @@
#define SAMPLES_PER_SEC 22050
//#define SAMPLES_PER_SEC 44100
+/*
+ * Include header files needed for the getFilesystemFactory() method.
+ */
+#if defined(__amigaos4__)
+ #include "backends/fs/amigaos4/amigaos4-fs-factory.h"
+#elif defined(__SYMBIAN32__)
+ // TODO: Move this to the symbian source code
+ #include "backends/fs/symbian/symbian-fs-factory.h"
+#elif defined(UNIX)
+ #include "backends/fs/posix/posix-fs-factory.h"
+#elif defined(WIN32)
+ #include "backends/fs/windows/windows-fs-factory.h"
+#endif
+
static Uint32 timer_handler(Uint32 interval, void *param) {
((DefaultTimerManager *)param)->handler();
@@ -212,6 +226,20 @@ Common::SaveFileManager *OSystem_SDL::getSavefileManager() {
return _savefile;
}
+FilesystemFactory *OSystem_SDL::getFilesystemFactory() {
+ #if defined(__amigaos4__)
+ return &AmigaOSFilesystemFactory::instance();
+ #elif defined(__SYMBIAN32__)
+ return &SymbianFilesystemFactory::instance();
+ #elif defined(UNIX)
+ return &POSIXFilesystemFactory::instance();
+ #elif defined(WIN32)
+ return &WindowsFilesystemFactory::instance();
+ #else
+ #error Unknown and unsupported backend in OSystem_SDL::getFilesystemFactory
+ #endif
+}
+
void OSystem_SDL::setWindowCaption(const char *caption) {
SDL_WM_SetCaption(caption, caption);
}
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 1ddd74693c..e77dcbf540 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -196,6 +196,7 @@ public:
#endif
virtual Common::SaveFileManager *getSavefileManager();
+ virtual FilesystemFactory *getFilesystemFactory();
protected:
bool _inited;