Core::SetState() allow state to change without sending a callback.

Some state changes are meant to be near instantanoues, before switching to something else. By reporting ithe instant switch, the UI will flicker between states (pause/play button) and the debugger will unnecessarily update. Skipping the callback avoids these issues.
This commit is contained in:
TryTwo 2023-11-16 11:07:37 -07:00
parent df8c0d2b39
commit b57ba42a55
3 changed files with 9 additions and 6 deletions

View file

@ -160,7 +160,7 @@ void CodeDiffDialog::ClearBlockCache()
Core::State old_state = Core::GetState();
if (old_state == Core::State::Running)
Core::SetState(Core::State::Paused);
Core::SetState(Core::State::Paused, false);
Core::System::GetInstance().GetJitInterface().ClearCache();
@ -349,7 +349,7 @@ void CodeDiffDialog::Update(bool include)
// Wrap everything in a pause
Core::State old_state = Core::GetState();
if (old_state == Core::State::Running)
Core::SetState(Core::State::Paused);
Core::SetState(Core::State::Paused, false);
// Main process
if (include)