summaryrefslogtreecommitdiffhomepage
path: root/Stars45/GameWinDX9.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/GameWinDX9.cpp')
-rw-r--r--Stars45/GameWinDX9.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Stars45/GameWinDX9.cpp b/Stars45/GameWinDX9.cpp
index bf7876f..efc825a 100644
--- a/Stars45/GameWinDX9.cpp
+++ b/Stars45/GameWinDX9.cpp
@@ -17,13 +17,28 @@
#include "Utils.h"
+GameWinDX9* GameWinDX9::instance = nullptr;
+
+
+GameWinDX9*
+GameWinDX9::GetInstance()
+{
+ return instance;
+}
+
+
GameWinDX9::GameWinDX9()
{
+ if (instance != nullptr)
+ Panic::Panic("Multiple instances of GameWinDX9");
+ instance = this;
}
GameWinDX9::~GameWinDX9()
{
+ if (instance != nullptr)
+ instance = nullptr;
}