Qt: Use coarse timer for background controller polling

Fixes high idle CPU usage.
This commit is contained in:
Connor McLaughlin 2020-04-30 12:34:09 +10:00
parent dc487655df
commit dac114fa4e
1 changed files with 2 additions and 1 deletions

View File

@ -772,7 +772,7 @@ void QtHostInterface::createBackgroundControllerPollTimer()
DebugAssert(!m_background_controller_polling_timer);
m_background_controller_polling_timer = new QTimer(this);
m_background_controller_polling_timer->setSingleShot(false);
m_background_controller_polling_timer->setTimerType(Qt::VeryCoarseTimer);
m_background_controller_polling_timer->setTimerType(Qt::CoarseTimer);
connect(m_background_controller_polling_timer, &QTimer::timeout, this, &QtHostInterface::doBackgroundControllerPoll);
}
@ -834,6 +834,7 @@ void QtHostInterface::threadEntryPoint()
{
// wait until we have a system before running
m_worker_thread_event_loop->exec();
Log_WarningPrintf("Event loop executed");
continue;
}