aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/EventManager.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 19:50:53 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 19:50:53 +0100
commite324ccb9b385b22db99575826a86501faba3a49d (patch)
tree8f245afc5662ac11a9e6433f3d7fa5f8f8c0e0a3 /src/crepe/manager/EventManager.cpp
parent9732dd4d51fa4a5115b639b090cca96574719380 (diff)
parent59954bfc14cdb32997a3fb09e6ee1b393a4dc027 (diff)
Merge branch 'master' into niels/UI
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());