From 6c89957cf1a1c768d6cfc216dd4d466eb2f75ae0 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 13 Mar 2019 15:34:00 +0100 Subject: [PATCH 1/2] DolphinQt: Save movie when closing emulation Missing feature from DolphinWX. --- Source/Core/DolphinQt/MainWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index c1c95a2612..c1c82dbd69 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -776,7 +776,7 @@ bool MainWindow::RequestStop() } } - // TODO: Add Movie shutdown + OnStopRecording(); // TODO: Add Debugger shutdown if (!m_stop_requested && UICommon::TriggerSTMPowerEvent()) @@ -1565,8 +1565,8 @@ void MainWindow::OnStopRecording() { if (Movie::IsRecordingInput()) OnExportRecording(); - - Movie::EndPlayInput(false); + if (Movie::IsMovieActive()) + Movie::EndPlayInput(false); emit RecordingStatusChanged(true); } From 185b1cf90c0f9a786f98c9658bfb4b0fb6963ac8 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 13 Mar 2019 15:41:57 +0100 Subject: [PATCH 2/2] DolphinQt: Fix OnStopRecording/OnExportRecording logic --- Source/Core/DolphinQt/MainWindow.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index c1c82dbd69..20e365ae43 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -1567,28 +1567,24 @@ void MainWindow::OnStopRecording() OnExportRecording(); if (Movie::IsMovieActive()) Movie::EndPlayInput(false); - emit RecordingStatusChanged(true); + emit RecordingStatusChanged(false); } void MainWindow::OnExportRecording() { bool was_paused = Core::GetState() == Core::State::Paused; - if (was_paused) + if (!was_paused) Core::SetState(Core::State::Paused); QString dtm_file = QFileDialog::getSaveFileName(this, tr("Select the Recording File"), QString(), tr("Dolphin TAS Movies (*.dtm)")); - if (was_paused) + if (!dtm_file.isEmpty()) + Movie::SaveRecording(dtm_file.toStdString()); + + if (!was_paused) Core::SetState(Core::State::Running); - - if (dtm_file.isEmpty()) - return; - - Core::SetState(Core::State::Running); - - Movie::SaveRecording(dtm_file.toStdString()); } void MainWindow::ShowTASInput()