diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index 46b0aa8963a..78ff0fae8a8 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -108,7 +108,7 @@ static void RunWithGPUThreadInactive(std::function f) auto& fifo = system.GetFifo(); fifo.PauseAndLock(true, was_running); f(); - fifo.PauseAndLock(false, was_running); + fifo.RestoreState(was_running); } else { diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index 513b6554087..7e07e0bbf37 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -86,6 +86,12 @@ void FifoManager::PauseAndLock(bool do_lock, bool unpause_on_unlock) } } +void FifoManager::RestoreState(const bool was_running) +{ + if (was_running) + EmulatorState(true); +} + void FifoManager::Init() { if (!m_config_callback_id) diff --git a/Source/Core/VideoCommon/Fifo.h b/Source/Core/VideoCommon/Fifo.h index 2fce8fdcb53..c6fc6376615 100644 --- a/Source/Core/VideoCommon/Fifo.h +++ b/Source/Core/VideoCommon/Fifo.h @@ -53,6 +53,7 @@ public: void Prepare(); // Must be called from the CPU thread. void DoState(PointerWrap& f); void PauseAndLock(bool do_lock, bool unpause_on_unlock); + void RestoreState(bool was_running); void UpdateWantDeterminism(bool want); bool UseDeterministicGPUThread() const { return m_use_deterministic_gpu_thread; } bool UseSyncGPU() const { return m_config_sync_gpu; } diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 46f8732c2fa..4c11fb084e8 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -70,7 +70,7 @@ void VideoConfig::Refresh() g_Config.VerifyValidity(); if (lock_gpu_thread) - system.GetFifo().PauseAndLock(false, true); + system.GetFifo().RestoreState(true); }; s_config_changed_callback_id =