summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2025-06-07 10:43:19 +0200
committerGitHub <noreply@github.com>2025-06-07 10:43:19 +0200
commit185b080f0388c4e39c4c5669f9ae13ddad4c3e63 (patch)
tree7c43a0e6cb8bf998d6be68c9ab80e0b1523c764e /Source
parent903eafcf6521601c0a2dc882c3d37d0e5a32ccd6 (diff)
parentd48e6e25ad1dd3fe347d1faa6394669fe0c2bae5 (diff)
Merge pull request #13142 from JosJuice/fifo-window-starting-stopping
DolphinQt: Call FIFOPlayerWindow::UpdateControls for Starting/Stopping
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp b/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp
index 721a960f71..5dfd10b547 100644
--- a/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp
+++ b/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp
@@ -59,10 +59,18 @@ FIFOPlayerWindow::FIFOPlayerWindow(FifoPlayer& fifo_player, FifoRecorder& fifo_r
});
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
+ // We don't want to trigger OnEmulationStarted when going from Paused to Running,
+ // and nothing in UpdateControls treats Paused and Running differently
+ if (state == Core::State::Paused)
+ state = Core::State::Running;
+
+ // Skip redundant updates
if (state == m_emu_state)
return;
- if (state == Core::State::Running && m_emu_state != Core::State::Paused)
+ UpdateControls();
+
+ if (state == Core::State::Running)
OnEmulationStarted();
else if (state == Core::State::Uninitialized)
OnEmulationStopped();
@@ -266,8 +274,6 @@ void FIFOPlayerWindow::StopRecording()
void FIFOPlayerWindow::OnEmulationStarted()
{
- UpdateControls();
-
if (m_fifo_player.GetFile())
OnFIFOLoaded();
}
@@ -278,7 +284,6 @@ void FIFOPlayerWindow::OnEmulationStopped()
if (m_fifo_recorder.IsRecording())
StopRecording();
- UpdateControls();
// When emulation stops, switch away from the analyzer tab, as it no longer shows anything useful
m_tab_widget->setCurrentWidget(m_main_widget);
m_analyzer->Update();