aboutsummaryrefslogtreecommitdiff
path: root/common/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/system.cpp')
-rw-r--r--common/system.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/common/system.cpp b/common/system.cpp
index 9c465a14fb..db020a2e5f 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -31,9 +31,10 @@
#include "common/config-manager.h"
#include "common/system.h"
-static OSystem *s_system = 0;
+DECLARE_SINGLETON(OSystem);
-static OSystem *createSystem() {
+template <>
+OSystem *makeInstance<>() {
// Attention: Do not call parseGraphicsMode() here, nor any other function
// which needs to access the OSystem instance, else you get stuck in an
// endless loop.
@@ -58,13 +59,6 @@ static OSystem *createSystem() {
#endif
}
-OSystem &OSystem::instance() {
- if (!s_system)
- s_system = createSystem();
- return *s_system;
-}
-
-
bool OSystem::setGraphicsMode(const char *name) {
if (!name)
return false;