mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
DolphinQt: Call FIFOPlayerWindow::UpdateControls for Starting/Stopping
Follow-up for https://github.com/dolphin-emu/dolphin/pull/12918#discussion_r1785153070.
This commit is contained in:
parent
da530a2eb9
commit
d48e6e25ad
@ -59,10 +59,18 @@ FIFOPlayerWindow::FIFOPlayerWindow(FifoPlayer& fifo_player, FifoRecorder& fifo_r
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
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)
|
if (state == m_emu_state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (state == Core::State::Running && m_emu_state != Core::State::Paused)
|
UpdateControls();
|
||||||
|
|
||||||
|
if (state == Core::State::Running)
|
||||||
OnEmulationStarted();
|
OnEmulationStarted();
|
||||||
else if (state == Core::State::Uninitialized)
|
else if (state == Core::State::Uninitialized)
|
||||||
OnEmulationStopped();
|
OnEmulationStopped();
|
||||||
@ -266,8 +274,6 @@ void FIFOPlayerWindow::StopRecording()
|
|||||||
|
|
||||||
void FIFOPlayerWindow::OnEmulationStarted()
|
void FIFOPlayerWindow::OnEmulationStarted()
|
||||||
{
|
{
|
||||||
UpdateControls();
|
|
||||||
|
|
||||||
if (m_fifo_player.GetFile())
|
if (m_fifo_player.GetFile())
|
||||||
OnFIFOLoaded();
|
OnFIFOLoaded();
|
||||||
}
|
}
|
||||||
@ -278,7 +284,6 @@ void FIFOPlayerWindow::OnEmulationStopped()
|
|||||||
if (m_fifo_recorder.IsRecording())
|
if (m_fifo_recorder.IsRecording())
|
||||||
StopRecording();
|
StopRecording();
|
||||||
|
|
||||||
UpdateControls();
|
|
||||||
// When emulation stops, switch away from the analyzer tab, as it no longer shows anything useful
|
// When emulation stops, switch away from the analyzer tab, as it no longer shows anything useful
|
||||||
m_tab_widget->setCurrentWidget(m_main_widget);
|
m_tab_widget->setCurrentWidget(m_main_widget);
|
||||||
m_analyzer->Update();
|
m_analyzer->Update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user