aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/Matrix.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index b0ff9b8..2689d14 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -4412,9 +4412,12 @@ namespace QuickMedia {
}
void Matrix::update() {
+ sf::Clock timer;
std::optional<std::function<void()>> task;
- while((task = ui_thread_tasks.pop_if_available()) != std::nullopt) {
+ int i = 0;
+ while((task = ui_thread_tasks.pop_if_available()) != std::nullopt && i < 10) {
task.value()();
+ ++i;
}
}