summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Fifo.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2025-11-01 10:06:08 +0100
committerGitHub <noreply@github.com>2025-11-01 10:06:08 +0100
commit91fd53a98ce7adcce2c724f4a06fe7df1bd0367a (patch)
tree8201e0dd1e127932559f5b59dc46e4dfd0102005 /Source/Core/VideoCommon/Fifo.cpp
parent828e72d604217d19e4b6875b7cac5d2e049ecedd (diff)
parent70d8bc6fd722c9d2fb13e20cc3de41b97a25a650 (diff)
Merge pull request #14035 from Dentomologist/pauseandlock_refactoring
PauseAndLock Refactoring
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index 0e7bb4c341..f183c93655 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -67,23 +67,21 @@ void FifoManager::DoState(PointerWrap& p)
p.Do(m_syncing_suspended);
}
-void FifoManager::PauseAndLock(bool do_lock, bool unpause_on_unlock)
+void FifoManager::PauseAndLock()
{
- if (do_lock)
- {
- SyncGPU(SyncGPUReason::Other);
- EmulatorState(false);
+ SyncGPU(SyncGPUReason::Other);
+ EmulatorState(false);
- if (!m_system.IsDualCoreMode() || m_use_deterministic_gpu_thread)
- return;
+ if (!m_system.IsDualCoreMode() || m_use_deterministic_gpu_thread)
+ return;
- m_gpu_mainloop.WaitYield(std::chrono::milliseconds(100), Host_YieldToUI);
- }
- else
- {
- if (unpause_on_unlock)
- EmulatorState(true);
- }
+ m_gpu_mainloop.WaitYield(std::chrono::milliseconds(100), Host_YieldToUI);
+}
+
+void FifoManager::RestoreState(const bool was_running)
+{
+ if (was_running)
+ EmulatorState(true);
}
void FifoManager::Init()