mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-23 06:57:08 +00:00
CPUManager: Remove redundant parameter from RestoreStateAndUnlock
RestoreStateAndUnlock was only called with control_adjacent=true. Remove the parameter and unconditionally call the function that was gated behind it being true.
This commit is contained in:
parent
8d0dbb0ef6
commit
4e64d8e94f
@ -801,7 +801,7 @@ static bool PauseAndLock(Core::System& system, bool do_lock, bool unpause_on_unl
|
|||||||
// mechanism to unpause them. If we unpaused the systems above when releasing
|
// mechanism to unpause them. If we unpaused the systems above when releasing
|
||||||
// the locks then they could call CPU::Break which would require detecting it
|
// the locks then they could call CPU::Break which would require detecting it
|
||||||
// and re-pausing with CPU::SetStepping.
|
// and re-pausing with CPU::SetStepping.
|
||||||
system.GetCPU().RestoreStateAndUnlock(unpause_on_unlock, true);
|
system.GetCPU().RestoreStateAndUnlock(unpause_on_unlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return was_unpaused;
|
return was_unpaused;
|
||||||
|
|||||||
@ -379,7 +379,7 @@ bool CPUManager::PauseAndLock()
|
|||||||
return was_unpaused;
|
return was_unpaused;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPUManager::RestoreStateAndUnlock(const bool unpause_on_unlock, const bool control_adjacent)
|
void CPUManager::RestoreStateAndUnlock(const bool unpause_on_unlock)
|
||||||
{
|
{
|
||||||
// Only need the stepping lock for this
|
// Only need the stepping lock for this
|
||||||
if (m_have_fake_cpu_thread)
|
if (m_have_fake_cpu_thread)
|
||||||
@ -401,8 +401,7 @@ void CPUManager::RestoreStateAndUnlock(const bool unpause_on_unlock, const bool
|
|||||||
m_state_paused_and_locked = false;
|
m_state_paused_and_locked = false;
|
||||||
m_state_cpu_cvar.notify_one();
|
m_state_cpu_cvar.notify_one();
|
||||||
|
|
||||||
if (control_adjacent)
|
RunAdjacentSystems(m_state == State::Running);
|
||||||
RunAdjacentSystems(m_state == State::Running);
|
|
||||||
}
|
}
|
||||||
m_stepping_lock.unlock();
|
m_stepping_lock.unlock();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public:
|
|||||||
// "control_adjacent" causes PauseAndLock to behave like SetStepping by modifying the
|
// "control_adjacent" causes PauseAndLock to behave like SetStepping by modifying the
|
||||||
// state of the Audio and FIFO subsystems as well.
|
// state of the Audio and FIFO subsystems as well.
|
||||||
bool PauseAndLock();
|
bool PauseAndLock();
|
||||||
void RestoreStateAndUnlock(bool unpause_on_unlock, bool control_adjacent);
|
void RestoreStateAndUnlock(bool unpause_on_unlock);
|
||||||
|
|
||||||
// Adds a job to be executed during on the CPU thread. This should be combined with
|
// Adds a job to be executed during on the CPU thread. This should be combined with
|
||||||
// PauseAndLock(), as while the CPU is in the run loop, it won't execute the function.
|
// PauseAndLock(), as while the CPU is in the run loop, it won't execute the function.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user