mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-19 14:55:38 +00:00
Qt: Use coarse timer for background controller polling
Fixes high idle CPU usage.
This commit is contained in:
parent
dc487655df
commit
dac114fa4e
|
@ -772,7 +772,7 @@ void QtHostInterface::createBackgroundControllerPollTimer()
|
||||||
DebugAssert(!m_background_controller_polling_timer);
|
DebugAssert(!m_background_controller_polling_timer);
|
||||||
m_background_controller_polling_timer = new QTimer(this);
|
m_background_controller_polling_timer = new QTimer(this);
|
||||||
m_background_controller_polling_timer->setSingleShot(false);
|
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);
|
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
|
// wait until we have a system before running
|
||||||
m_worker_thread_event_loop->exec();
|
m_worker_thread_event_loop->exec();
|
||||||
|
Log_WarningPrintf("Event loop executed");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue