From dac114fa4e456a87bbe04baed2b021e65bde4a48 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 30 Apr 2020 12:34:09 +1000 Subject: [PATCH] Qt: Use coarse timer for background controller polling Fixes high idle CPU usage. --- src/duckstation-qt/qthostinterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index ff8925830..fe8f0bc87 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -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; }