Browse Source

[desktop] tas: add option to disable file overwrite dialog (#3657)

Hello everybody, thank you for letting me participate in the development of the Eden emulator!

I've been playing around with the TAS functionality and didn't want to always click "Yes" in the dialog that askes if I want to "Overwrite file of player 1?" after recording the inputs.
So I can't record and play TAS files with keybinds only, because I'd still need to switching from my contoller to my keyboard and back.

So I added the option "Show recording dialog" into the configure_tas screen.
(The final naming and string can be changed of course.)
It's a checkbox that is enabled by default (so no changes if ignored), but can be unchecked to disable the popup.
The change has been tested on top of the current master branch.

I've also created a commit to add the relevant translation data, where german is translated and the rest unfinished.
I'm not sure how this would be handled as this project uses transifex for it localization, so I can remove this commit if preferred.

Have a great day!
- Michi

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3657
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: SchweGELBin <abramjannikmichael06@gmail.com>
Co-committed-by: SchweGELBin <abramjannikmichael06@gmail.com>
pull/3696/head
SchweGELBin 5 days ago
committed by crueter
parent
commit
a022560991
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 1
      src/common/settings.h
  2. 4
      src/yuzu/configuration/configure_tas.cpp
  3. 7
      src/yuzu/configuration/configure_tas.ui
  4. 4
      src/yuzu/main_window.cpp

1
src/common/settings.h

@ -706,6 +706,7 @@ struct Values {
Setting<bool> pause_tas_on_load{linkage, true, "pause_tas_on_load", Category::Controls}; 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_enable{linkage, false, "tas_enable", Category::Controls};
Setting<bool> tas_loop{linkage, false, "tas_loop", 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{ Setting<bool> mouse_panning{
linkage, false, "mouse_panning", Category::Controls, Specialization::Default, false}; linkage, false, "mouse_panning", Category::Controls, Specialization::Default, false};

4
src/yuzu/configuration/configure_tas.cpp

@ -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-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // 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_enable->setChecked(Settings::values.tas_enable.GetValue());
ui->tas_loop_script->setChecked(Settings::values.tas_loop.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_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() { void ConfigureTasDialog::ApplyConfiguration() {
@ -42,6 +43,7 @@ void ConfigureTasDialog::ApplyConfiguration() {
Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked()); Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked());
Settings::values.tas_loop.SetValue(ui->tas_loop_script->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.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) { void ConfigureTasDialog::SetDirectory(DirectoryTarget target, QLineEdit* edit) {

7
src/yuzu/configuration/configure_tas.ui

@ -78,6 +78,13 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</item> </item>

4
src/yuzu/main_window.cpp

@ -3665,6 +3665,7 @@ void MainWindow::OnTasRecord() {
const bool is_recording = input_subsystem->GetTas()->Record(); const bool is_recording = input_subsystem->GetTas()->Record();
if (!is_recording) { if (!is_recording) {
if (Settings::values.tas_show_recording_dialog.GetValue()) {
is_tas_recording_dialog_active = true; is_tas_recording_dialog_active = true;
bool answer = question(this, tr("TAS Recording"), tr("Overwrite file of player 1?"), bool answer = question(this, tr("TAS Recording"), tr("Overwrite file of player 1?"),
@ -3672,6 +3673,9 @@ void MainWindow::OnTasRecord() {
input_subsystem->GetTas()->SaveRecording(answer); input_subsystem->GetTas()->SaveRecording(answer);
is_tas_recording_dialog_active = false; is_tas_recording_dialog_active = false;
} else {
input_subsystem->GetTas()->SaveRecording(true);
}
} }
OnTasStateChanged(); OnTasStateChanged();
} }

Loading…
Cancel
Save