Browse Source
[desktop] tas: add option to disable file overwrite dialog
pull/3657/head
SchweGELBin
1 week ago
Failed to extract signature
4 changed files with
20 additions and
6 deletions
-
src/common/settings.h
-
src/yuzu/configuration/configure_tas.cpp
-
src/yuzu/configuration/configure_tas.ui
-
src/yuzu/main_window.cpp
|
|
|
@ -706,6 +706,7 @@ struct Values { |
|
|
|
Setting<bool> pause_tas_on_load{linkage, true, "pause_tas_on_load", Category::Controls}; |
|
|
|
Setting<bool> tas_enable{linkage, false, "tas_enable", Category::Controls}; |
|
|
|
Setting<bool> tas_loop{linkage, false, "tas_loop", Category::Controls}; |
|
|
|
Setting<bool> tas_show_recording_dialog{linkage, true, "tas_show_recording_dialog", Category::Controls}; |
|
|
|
|
|
|
|
Setting<bool> mouse_panning{ |
|
|
|
linkage, false, "mouse_panning", Category::Controls, Specialization::Default, false}; |
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
|
|
@ -35,6 +35,7 @@ void ConfigureTasDialog::LoadConfiguration() { |
|
|
|
ui->tas_enable->setChecked(Settings::values.tas_enable.GetValue()); |
|
|
|
ui->tas_loop_script->setChecked(Settings::values.tas_loop.GetValue()); |
|
|
|
ui->tas_pause_on_load->setChecked(Settings::values.pause_tas_on_load.GetValue()); |
|
|
|
ui->tas_show_recording_dialog->setChecked(Settings::values.tas_show_recording_dialog.GetValue()); |
|
|
|
} |
|
|
|
|
|
|
|
void ConfigureTasDialog::ApplyConfiguration() { |
|
|
|
@ -42,6 +43,7 @@ void ConfigureTasDialog::ApplyConfiguration() { |
|
|
|
Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked()); |
|
|
|
Settings::values.tas_loop.SetValue(ui->tas_loop_script->isChecked()); |
|
|
|
Settings::values.pause_tas_on_load.SetValue(ui->tas_pause_on_load->isChecked()); |
|
|
|
Settings::values.tas_show_recording_dialog.SetValue(ui->tas_show_recording_dialog->isChecked()); |
|
|
|
} |
|
|
|
|
|
|
|
void ConfigureTasDialog::SetDirectory(DirectoryTarget target, QLineEdit* edit) { |
|
|
|
|
|
|
|
@ -78,6 +78,13 @@ |
|
|
|
</property> |
|
|
|
</widget> |
|
|
|
</item> |
|
|
|
<item row="3" column="0" colspan="4"> |
|
|
|
<widget class="QCheckBox" name="tas_show_recording_dialog"> |
|
|
|
<property name="text"> |
|
|
|
<string>Show recording dialog</string> |
|
|
|
</property> |
|
|
|
</widget> |
|
|
|
</item> |
|
|
|
</layout> |
|
|
|
</widget> |
|
|
|
</item> |
|
|
|
|
|
|
|
@ -3672,6 +3672,7 @@ void MainWindow::OnTasRecord() { |
|
|
|
|
|
|
|
const bool is_recording = input_subsystem->GetTas()->Record(); |
|
|
|
if (!is_recording) { |
|
|
|
if (Settings::values.tas_show_recording_dialog.GetValue()) { |
|
|
|
is_tas_recording_dialog_active = true; |
|
|
|
|
|
|
|
bool answer = question(this, tr("TAS Recording"), tr("Overwrite file of player 1?"), |
|
|
|
@ -3679,6 +3680,9 @@ void MainWindow::OnTasRecord() { |
|
|
|
|
|
|
|
input_subsystem->GetTas()->SaveRecording(answer); |
|
|
|
is_tas_recording_dialog_active = false; |
|
|
|
} else { |
|
|
|
input_subsystem->GetTas()->SaveRecording(true); |
|
|
|
} |
|
|
|
} |
|
|
|
OnTasStateChanged(); |
|
|
|
} |
|
|
|
|