diff --git a/libs/app/source/ui_scene.cpp b/libs/app/source/ui_scene.cpp index 7366d8d1..1315299c 100644 --- a/libs/app/source/ui_scene.cpp +++ b/libs/app/source/ui_scene.cpp @@ -1,5 +1,7 @@ #include +#include + namespace psemek::app { @@ -88,8 +90,11 @@ namespace psemek::app void ui_scene::update() { + static constexpr std::size_t max_events_per_frame = 64; + controller_.update(update_clock_.restart().count()); - controller_.loop()->pump(); + if (controller_.loop()->pump(max_events_per_frame) == max_events_per_frame) + log::warning() << "UI event loop had more than " << max_events_per_frame << " events, delaying others"; } void ui_scene::present()