Skip to content

Commit

Permalink
DolphinQt: Fix OnStopRecording/OnExportRecording logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed Mar 13, 2019
1 parent 6c89957 commit 185b1cf
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -1567,28 +1567,24 @@ void MainWindow::OnStopRecording()
OnExportRecording(); OnExportRecording();
if (Movie::IsMovieActive()) if (Movie::IsMovieActive())
Movie::EndPlayInput(false); Movie::EndPlayInput(false);
emit RecordingStatusChanged(true); emit RecordingStatusChanged(false);
} }


void MainWindow::OnExportRecording() void MainWindow::OnExportRecording()
{ {
bool was_paused = Core::GetState() == Core::State::Paused; bool was_paused = Core::GetState() == Core::State::Paused;


if (was_paused) if (!was_paused)
Core::SetState(Core::State::Paused); Core::SetState(Core::State::Paused);


QString dtm_file = QFileDialog::getSaveFileName(this, tr("Select the Recording File"), QString(), QString dtm_file = QFileDialog::getSaveFileName(this, tr("Select the Recording File"), QString(),
tr("Dolphin TAS Movies (*.dtm)")); tr("Dolphin TAS Movies (*.dtm)"));


if (was_paused) if (!dtm_file.isEmpty())
Core::SetState(Core::State::Running); Movie::SaveRecording(dtm_file.toStdString());

if (dtm_file.isEmpty())
return;

Core::SetState(Core::State::Running);


Movie::SaveRecording(dtm_file.toStdString()); if (!was_paused)
Core::SetState(Core::State::Running);
} }


void MainWindow::ShowTASInput() void MainWindow::ShowTASInput()
Expand Down

0 comments on commit 185b1cf

Please sign in to comment.