From 278e81b4ab039802ced33810aef640e61f1ab47a Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Sat, 7 Dec 2024 15:35:42 +0100 Subject: removed duplicate dispatch --- src/crepe/api/LoopManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/crepe/api/LoopManager.cpp') diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index f41c357..4d97e16 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -27,7 +27,10 @@ LoopManager::LoopManager() { [this](const ShutDownEvent & event) { return this->on_shutdown(event); }); } -void LoopManager::process_input() { this->get_system().update(); } +void LoopManager::process_input() { + this->get_system().update(); + this->event_manager.dispatch_events(); + } void LoopManager::start() { this->setup(); @@ -35,8 +38,6 @@ void LoopManager::start() { } void LoopManager::fixed_update() { - EventManager & ev = this->mediator.event_manager; - ev.dispatch_events(); this->get_system().update(); this->get_system().update(); this->get_system().update(); @@ -49,7 +50,6 @@ void LoopManager::loop() { while (this->loop_timer.get_lag() >= this->loop_timer.get_fixed_delta_time()) { this->process_input(); - event_manager.dispatch_events(); this->fixed_update(); this->loop_timer.advance_fixed_update(); } -- cgit v1.2.3