RCS file: /cvsroot/scummvm/scummvm/common/system.h,v
retrieving revision 1.80
diff -u -d -r1.80 system.h
|
|
|
29 | 29 | #include "common/savefile.h" |
30 | 30 | #include "common/singleton.h" |
31 | 31 | |
32 | | class OSystem; |
33 | | |
34 | | /** |
35 | | * Custom object factory for OSystem. |
36 | | */ |
37 | | template <> |
38 | | OSystem *Common::Singleton<OSystem>::makeInstance(); |
39 | | |
40 | 32 | |
41 | 33 | /** |
42 | 34 | * Interface for ScummVM backends. If you want to port ScummVM to a system |
… |
… |
|
49 | 41 | * control audio CD playback, and sound output. |
50 | 42 | */ |
51 | 43 | class OSystem : public Common::Singleton<OSystem> { |
| 44 | protected: |
| 45 | static OSystem *createSystem(); |
| 46 | friend class Common::Singleton<SingletonBaseType>; |
| 47 | |
52 | 48 | public: |
53 | 49 | |
54 | 50 | /** @name Feature flags */ |
… |
… |
|
682 | 678 | //@} |
683 | 679 | }; |
684 | 680 | |
| 681 | /** |
| 682 | * Custom object factory for OSystem. |
| 683 | */ |
| 684 | template <> |
| 685 | OSystem *Common::Singleton<OSystem>::makeInstance() { |
| 686 | return OSystem::createSystem(); |
| 687 | } |
| 688 | |
| 689 | |
| 690 | |
685 | 691 | /** The global OSystem instance. Inited in main(). */ |
686 | 692 | #define g_system (&OSystem::instance()) |
687 | 693 | |
RCS file: /cvsroot/scummvm/scummvm/common/system.cpp,v
retrieving revision 1.17
diff -u -d -r1.17 system.cpp
|
|
|
33 | 33 | |
34 | 34 | DECLARE_SINGLETON(OSystem); |
35 | 35 | |
36 | | template <> |
37 | | OSystem *Common::Singleton<OSystem>::makeInstance() { |
| 36 | OSystem *OSystem::createSystem() { |
38 | 37 | // Attention: Do not call parseGraphicsMode() here, nor any other function |
39 | 38 | // which needs to access the OSystem instance, else you get stuck in an |
40 | 39 | // endless loop. |