From 2004de717026ba3213b8cdf5db54d4fa690bea5d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 6 Mar 2020 21:55:10 +1000 Subject: [PATCH] Qt: Fix controller rebinding not registering when paused --- src/duckstation-qt/qthostinterface.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index f8712bb24..86d02e88e 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -264,6 +264,14 @@ void QtHostInterface::OnSystemPaused(bool paused) emit emulationPaused(paused); + if (m_background_controller_polling_enable_count > 0) + { + if (paused) + createBackgroundControllerPollTimer(); + else + destroyBackgroundControllerPollTimer(); + } + if (!paused) { wakeThread(); @@ -562,7 +570,7 @@ void QtHostInterface::enableBackgroundControllerPolling() if (m_background_controller_polling_enable_count++ > 0) return; - if (!m_system) + if (!m_system || m_paused) { createBackgroundControllerPollTimer(); @@ -583,7 +591,7 @@ void QtHostInterface::disableBackgroundControllerPolling() if (--m_background_controller_polling_enable_count > 0) return; - if (!m_system) + if (!m_system || m_paused) destroyBackgroundControllerPollTimer(); }