From c138e38951563942431a98b0d81fbc930e4b3229 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 31 Aug 2024 12:34:35 +1000 Subject: [PATCH] Ask the user to reconsider quitting if A/V recording (resolves #4017) --- src/BizHawk.Client.EmuHawk/MainForm.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 395d1a78a7..e8f2828e49 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -783,6 +783,19 @@ namespace BizHawk.Client.EmuHawk private void CheckMayCloseAndCleanup(object/*?*/ closingSender, CancelEventArgs closingArgs) { + if (_currAviWriter is not null) + { + if (!this.ModalMessageBox2( + caption: "Really quit?", + icon: EMsgBoxIcon.Question, + text: "You are currently recording A/V.\nChoose \"Yes\" to finalise it and quit EmuHawk.\nChoose \"No\" to cancel shutdown and continue recording.")) + { + closingArgs.Cancel = true; + return; + } + StopAv(); + } + if (!Tools.AskSave()) { closingArgs.Cancel = true;