mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 22:38:34 +00:00
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:
parent
2aec195ec8
commit
f29fe15d77
4 changed files with 28 additions and 1 deletions
|
@ -59,7 +59,12 @@ Settings::Settings()
|
|||
{
|
||||
qRegisterMetaType<Core::State>();
|
||||
Core::AddOnStateChangedCallback([this](Core::State new_state) {
|
||||
QueueOnObject(this, [this, new_state] { emit EmulationStateChanged(new_state); });
|
||||
QueueOnObject(this, [this, new_state] {
|
||||
// Avoid signal spam while continuously frame stepping. Will still send a signal for the first
|
||||
// and last framestep.
|
||||
if (!m_continuously_frame_stepping)
|
||||
emit EmulationStateChanged(new_state);
|
||||
});
|
||||
});
|
||||
|
||||
Config::AddConfigChangedCallback([this] {
|
||||
|
@ -827,3 +832,13 @@ void Settings::SetUSBKeyboardConnected(bool connected)
|
|||
emit USBKeyboardConnectionChanged(connected);
|
||||
}
|
||||
}
|
||||
|
||||
void Settings::SetIsContinuouslyFrameStepping(bool is_stepping)
|
||||
{
|
||||
m_continuously_frame_stepping = is_stepping;
|
||||
}
|
||||
|
||||
bool Settings::GetIsContinuouslyFrameStepping() const
|
||||
{
|
||||
return m_continuously_frame_stepping;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue