mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Apply More Core::RunAsCPUThread
In places where applicable, Core::RunAsCPUThread has replaced Core::SetState workarounds to pause and resume emulation for thread-sensitive operations. - void Core::SaveScreenShot() - void Core::SaveScreenShot(std::string_view name) - void JitInterface::GetProfileResults(Profiler::ProfileStats *prof_stats) - void MainWindow::OnExportRecording()
This commit is contained in:
@ -1675,19 +1675,12 @@ void MainWindow::OnStopRecording()
|
||||
|
||||
void MainWindow::OnExportRecording()
|
||||
{
|
||||
bool was_paused = Core::GetState() == Core::State::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 (!dtm_file.isEmpty())
|
||||
Movie::SaveRecording(dtm_file.toStdString());
|
||||
|
||||
if (!was_paused)
|
||||
Core::SetState(Core::State::Running);
|
||||
Core::RunAsCPUThread([this] {
|
||||
QString dtm_file = QFileDialog::getSaveFileName(this, tr("Select the Recording File"),
|
||||
QString(), tr("Dolphin TAS Movies (*.dtm)"));
|
||||
if (!dtm_file.isEmpty())
|
||||
Movie::SaveRecording(dtm_file.toStdString());
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::OnActivateChat()
|
||||
|
Reference in New Issue
Block a user