diff options
Diffstat (limited to 'common/system.h')
-rw-r--r-- | common/system.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/common/system.h b/common/system.h index 8c672e18c9..39ff9b3d0d 100644 --- a/common/system.h +++ b/common/system.h @@ -29,14 +29,6 @@ #include "common/savefile.h" #include "common/singleton.h" -class OSystem; - -/** - * Custom object factory for OSystem. - */ -template <> -OSystem *Common::Singleton<OSystem>::makeInstance(); - /** * Interface for ScummVM backends. If you want to port ScummVM to a system @@ -49,6 +41,10 @@ OSystem *Common::Singleton<OSystem>::makeInstance(); * control audio CD playback, and sound output. */ class OSystem : public Common::Singleton<OSystem> { +protected: + static OSystem *createSystem(); + friend class Common::Singleton<SingletonBaseType>; + public: /** @name Feature flags */ @@ -682,6 +678,14 @@ public: //@} }; +/** + * Custom object factory for OSystem. + */ +template <> +OSystem *Common::Singleton<OSystem>::makeInstance(); + + + /** The global OSystem instance. Inited in main(). */ #define g_system (&OSystem::instance()) |