mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
FifoManager: Extract RestoreState from PauseAndLock
Replace calls of FifoManager::PauseAndLock(do_lock=false) with new function RestoreState for clarity.
This commit is contained in:
parent
f628a979c4
commit
f497eb519e
@ -108,7 +108,7 @@ static void RunWithGPUThreadInactive(std::function<void()> f)
|
||||
auto& fifo = system.GetFifo();
|
||||
fifo.PauseAndLock(true, was_running);
|
||||
f();
|
||||
fifo.PauseAndLock(false, was_running);
|
||||
fifo.RestoreState(was_running);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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; }
|
||||
|
||||
@ -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 =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user