diff options
| author | Dentomologist <dentomologist@gmail.com> | 2023-06-04 17:07:07 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2025-10-26 18:01:51 -0700 |
| commit | f497eb519e672a0dffbcd029dc937425af754ba0 (patch) | |
| tree | 7bbc695425ee671d700b3eef8d8127bcb695f0de /Source/Core/VideoCommon | |
| parent | f628a979c435723eaec40b7081634a67b575fcb8 (diff) | |
FifoManager: Extract RestoreState from PauseAndLock
Replace calls of FifoManager::PauseAndLock(do_lock=false) with new
function RestoreState for clarity.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index 513b655408..7e07e0bbf3 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 2fce8fdcb5..c6fc637661 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 46f8732c2f..4c11fb084e 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 = |
