Don't forget to clear the event queue..

This commit is contained in:
Henrik Rydgård committed 2026-06-25 13:00:40 +02:00
1 parent 72ee82844d
commit 444f78bf84
2 files changed
+7 -4

No files matched your search

+7 -2
View File
@@ -138,9 +138,14 @@ void ScreenManager::update() {
// Process queued events.
std::lock_guard<std::mutex> eventGuard(eventQueueLock_);
std::deque<QueuedEvent> events;
{
std::lock_guard<std::mutex> eventGuard(eventQueueLock_);
events = std::move(eventQueue_);
eventQueue_.clear();
}
for (const QueuedEvent &ev : eventQueue_) {
for (const QueuedEvent &ev : events) {
switch (ev.type) {
case QueuedEventType::TOUCH:
{