aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/EventManager.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-12 19:23:25 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-12 19:23:25 +0100
commitcd5f6b542f9cb447e3a9f500713c556a3d034bf3 (patch)
tree1d3372f30305e9f7a567b220a9b51464ba8ba272 /src/crepe/manager/EventManager.cpp
parented90fde01c38b878645bb68d3aa7353349f3b300 (diff)
parentfd403d038b017ec8976023471073329896035e36 (diff)
merge master
Diffstat (limited to 'src/crepe/manager/EventManager.cpp')
-rw-r--r--src/crepe/manager/EventManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/crepe/manager/EventManager.cpp b/src/crepe/manager/EventManager.cpp
index 20f0dd3..6aa49ee 100644
--- a/src/crepe/manager/EventManager.cpp
+++ b/src/crepe/manager/EventManager.cpp
@@ -3,11 +3,9 @@
using namespace crepe;
using namespace std;
-EventManager & EventManager::get_instance() {
- static EventManager instance;
- return instance;
+EventManager::EventManager(Mediator & mediator) : Manager(mediator) {
+ this->mediator.event_manager = *this;
}
-
void EventManager::dispatch_events() {
for (auto & event : this->events_queue) {
this->handle_event(event.type, event.channel, *event.event.get());