DolphinQt: Fix OnStopRecording/OnExportRecording logic
This commit is contained in:
parent
6c89957cf1
commit
185b1cf90c
|
@ -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())
|
||||||
|
Movie::SaveRecording(dtm_file.toStdString());
|
||||||
|
|
||||||
|
if (!was_paused)
|
||||||
Core::SetState(Core::State::Running);
|
Core::SetState(Core::State::Running);
|
||||||
|
|
||||||
if (dtm_file.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Core::SetState(Core::State::Running);
|
|
||||||
|
|
||||||
Movie::SaveRecording(dtm_file.toStdString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ShowTASInput()
|
void MainWindow::ShowTASInput()
|
||||||
|
|
Loading…
Reference in New Issue