From 5274fa32acdb67c9e51dc76f25d3af05db7e6e82 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 6 Jul 2020 02:47:13 +1000 Subject: [PATCH] Qt: Pump events on main thread when waiting for init --- src/duckstation-qt/qthostinterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index 7fa2e0979..ea531ef52 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -991,6 +991,8 @@ void QtHostInterface::Thread::setInitResult(bool result) bool QtHostInterface::Thread::waitForInit() { - m_init_event.Wait(); + while (!m_init_event.TryWait(100)) + QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); + return m_init_result.load(); }