Qt: Pump events on main thread when waiting for init

This commit is contained in:
Connor McLaughlin 2020-07-06 02:47:13 +10:00
parent 76cb52407b
commit 5274fa32ac
1 changed files with 3 additions and 1 deletions

View File

@ -991,6 +991,8 @@ void QtHostInterface::Thread::setInitResult(bool result)
bool QtHostInterface::Thread::waitForInit() bool QtHostInterface::Thread::waitForInit()
{ {
m_init_event.Wait(); while (!m_init_event.TryWait(100))
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
return m_init_result.load(); return m_init_result.load();
} }