summaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-06-26 10:38:39 -0500
committerMonsterDruide1 <5958456@gmail.com>2021-09-18 23:22:42 +0200
commit9bb6580d89efb76534d9395bc052459d5f58e7c4 (patch)
treeaab812da6162e4f9ac305c80e245409d2781d8a2 /src/yuzu/main.cpp
parentf078b15565c8cab08587b8f8629d878615705cfb (diff)
input_common/tas: overwrite file dialog
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 6c2835a2f..560de89af 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1027,7 +1027,16 @@ void GMainWindow::InitializeHotkeys() {
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("TAS Reset"), this),
&QShortcut::activated, this, [&] { input_subsystem->GetTas()->Reset(); });
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("TAS Record"), this),
- &QShortcut::activated, this, [&] { input_subsystem->GetTas()->Record(); });
+ &QShortcut::activated, this, [&] {
+ bool is_recording = input_subsystem->GetTas()->Record();
+ if (!is_recording) {
+ QMessageBox::StandardButton reply;
+ reply = QMessageBox::question(this, tr("TAS Recording"),
+ tr("Overwrite file of player 1?"),
+ QMessageBox::Yes | QMessageBox::No);
+ input_subsystem->GetTas()->SaveRecording(reply == QMessageBox::Yes);
+ }
+ });
}
void GMainWindow::SetDefaultUIGeometry() {