summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/Src/EventHandler.cpp8
-rw-r--r--Source/Core/InputCommon/Src/EventHandler.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/Src/EventHandler.cpp b/Source/Core/InputCommon/Src/EventHandler.cpp
index 81890202db..19dc819baf 100644
--- a/Source/Core/InputCommon/Src/EventHandler.cpp
+++ b/Source/Core/InputCommon/Src/EventHandler.cpp
@@ -19,13 +19,15 @@ EventHandler::~EventHandler() {
EventHandler *EventHandler::GetInstance() {
// fprintf(stderr, "handler instance %p\n", m_Instance);
+ return m_Instance;
+}
- if (! m_Instance)
+void EventHandler::Init()
+{
m_Instance = new EventHandler();
- return m_Instance;
}
-void EventHandler::Destroy() {
+void EventHandler::Shutdown() {
if (m_Instance)
delete m_Instance;
// fprintf(stderr, "deleting instance %p\n", m_Instance);
diff --git a/Source/Core/InputCommon/Src/EventHandler.h b/Source/Core/InputCommon/Src/EventHandler.h
index 688f229340..bde6bbf430 100644
--- a/Source/Core/InputCommon/Src/EventHandler.h
+++ b/Source/Core/InputCommon/Src/EventHandler.h
@@ -51,7 +51,8 @@ public:
bool RemoveEventListener(Keys key);
void Update();
static EventHandler *GetInstance();
- static void Destroy();
+ static void Init();
+ static void Shutdown();
bool addEvent(sf::Event *e);
static bool TestEvent (Keys k, sf::Event e);
#if defined HAVE_WX && HAVE_WX