mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
FifoManager: Remove redundant PauseAndLock parameters
PauseAndLock was only called with do_lock=true, and the function only used unpauseOnUnlock when do_lock was false.
This commit is contained in:
parent
f497eb519e
commit
933071dd57
@ -784,7 +784,7 @@ static bool PauseAndLock(Core::System& system)
|
|||||||
|
|
||||||
// video has to come after CPU, because CPU thread can wait for video thread
|
// video has to come after CPU, because CPU thread can wait for video thread
|
||||||
// (s_efbAccessRequested).
|
// (s_efbAccessRequested).
|
||||||
system.GetFifo().PauseAndLock(true, false);
|
system.GetFifo().PauseAndLock();
|
||||||
|
|
||||||
ResetRumble();
|
ResetRumble();
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ static void RunWithGPUThreadInactive(std::function<void()> f)
|
|||||||
auto& system = Core::System::GetInstance();
|
auto& system = Core::System::GetInstance();
|
||||||
const bool was_running = Core::GetState(system) == Core::State::Running;
|
const bool was_running = Core::GetState(system) == Core::State::Running;
|
||||||
auto& fifo = system.GetFifo();
|
auto& fifo = system.GetFifo();
|
||||||
fifo.PauseAndLock(true, was_running);
|
fifo.PauseAndLock();
|
||||||
f();
|
f();
|
||||||
fifo.RestoreState(was_running);
|
fifo.RestoreState(was_running);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,23 +67,15 @@ void FifoManager::DoState(PointerWrap& p)
|
|||||||
p.Do(m_syncing_suspended);
|
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)
|
if (!m_system.IsDualCoreMode() || m_use_deterministic_gpu_thread)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_gpu_mainloop.WaitYield(std::chrono::milliseconds(100), Host_YieldToUI);
|
m_gpu_mainloop.WaitYield(std::chrono::milliseconds(100), Host_YieldToUI);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (unpause_on_unlock)
|
|
||||||
EmulatorState(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FifoManager::RestoreState(const bool was_running)
|
void FifoManager::RestoreState(const bool was_running)
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public:
|
|||||||
void Shutdown();
|
void Shutdown();
|
||||||
void Prepare(); // Must be called from the CPU thread.
|
void Prepare(); // Must be called from the CPU thread.
|
||||||
void DoState(PointerWrap& f);
|
void DoState(PointerWrap& f);
|
||||||
void PauseAndLock(bool do_lock, bool unpause_on_unlock);
|
void PauseAndLock();
|
||||||
void RestoreState(bool was_running);
|
void RestoreState(bool was_running);
|
||||||
void UpdateWantDeterminism(bool want);
|
void UpdateWantDeterminism(bool want);
|
||||||
bool UseDeterministicGPUThread() const { return m_use_deterministic_gpu_thread; }
|
bool UseDeterministicGPUThread() const { return m_use_deterministic_gpu_thread; }
|
||||||
|
|||||||
@ -64,7 +64,7 @@ void VideoConfig::Refresh()
|
|||||||
|
|
||||||
const bool lock_gpu_thread = Core::IsRunning(system);
|
const bool lock_gpu_thread = Core::IsRunning(system);
|
||||||
if (lock_gpu_thread)
|
if (lock_gpu_thread)
|
||||||
system.GetFifo().PauseAndLock(true, false);
|
system.GetFifo().PauseAndLock();
|
||||||
|
|
||||||
g_Config.Refresh();
|
g_Config.Refresh();
|
||||||
g_Config.VerifyValidity();
|
g_Config.VerifyValidity();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user