summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorDentomologist <dentomologist@gmail.com>2023-06-04 13:22:09 -0700
committerDentomologist <dentomologist@gmail.com>2025-10-26 17:59:47 -0700
commit4e64d8e94f8715885d243afe4dafcda0a56a05be (patch)
tree684ef6079bc913d555852d0edaa5aec39e6a2201 /Source
parent8d0dbb0ef64ffb76b64bc94166399dc2dad1af2c (diff)
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Core.cpp2
-rw-r--r--Source/Core/Core/HW/CPU.cpp5
-rw-r--r--Source/Core/Core/HW/CPU.h2
3 files changed, 4 insertions, 5 deletions
diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp
index b8f5891f3d..f7087dee03 100644
--- a/Source/Core/Core/Core.cpp
+++ b/Source/Core/Core/Core.cpp
@@ -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
// the locks then they could call CPU::Break which would require detecting it
// and re-pausing with CPU::SetStepping.
- system.GetCPU().RestoreStateAndUnlock(unpause_on_unlock, true);
+ system.GetCPU().RestoreStateAndUnlock(unpause_on_unlock);
}
return was_unpaused;
diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp
index 6f1a3c7285..1803430352 100644
--- a/Source/Core/Core/HW/CPU.cpp
+++ b/Source/Core/Core/HW/CPU.cpp
@@ -379,7 +379,7 @@ bool CPUManager::PauseAndLock()
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
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_cpu_cvar.notify_one();
- if (control_adjacent)
- RunAdjacentSystems(m_state == State::Running);
+ RunAdjacentSystems(m_state == State::Running);
}
m_stepping_lock.unlock();
}
diff --git a/Source/Core/Core/HW/CPU.h b/Source/Core/Core/HW/CPU.h
index 40cb25ca6e..4fa0c1105b 100644
--- a/Source/Core/Core/HW/CPU.h
+++ b/Source/Core/Core/HW/CPU.h
@@ -96,7 +96,7 @@ public:
// "control_adjacent" causes PauseAndLock to behave like SetStepping by modifying the
// state of the Audio and FIFO subsystems as well.
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
// PauseAndLock(), as while the CPU is in the run loop, it won't execute the function.