FrameAdvance: Fix continuous frame advancing while the debug UI is open. Blocks signals from being spammed to update the UI.

This commit is contained in:
TryTwo
2024-05-17 21:16:59 -07:00
parent 2aec195ec8
commit f29fe15d77
4 changed files with 28 additions and 1 deletions

View File

@ -113,6 +113,8 @@ static void HandleFrameStepHotkeys()
if ((frame_step_count == 0 || frame_step_count == FRAME_STEP_DELAY) && !frame_step_hold)
{
if (frame_step_count > 0)
Settings::Instance().SetIsContinuouslyFrameStepping(true);
Core::QueueHostJob([](auto& system) { Core::DoFrameStep(system); });
frame_step_hold = true;
}
@ -138,6 +140,8 @@ static void HandleFrameStepHotkeys()
frame_step_count = 0;
frame_step_hold = false;
frame_step_delay_count = 0;
Settings::Instance().SetIsContinuouslyFrameStepping(false);
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
}
}