aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXpl0itR <xpl0itr@outlook.com>2020-10-10 00:06:48 +0100
committerGitHub <noreply@github.com>2020-10-10 01:06:48 +0200
commitce87650d818bfe89403358380ff21aa1b56bb8a1 (patch)
treea6530a727b20702d8681d317b2d825f5031bf667
parent8506b7a3342692a2c92322df727b675738a09829 (diff)
Show confirmation dialog when attempting to close while a game is loaded (#1582)
-rw-r--r--Ryujinx/Ui/MainWindow.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index dafb5a45..f6c88a79 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -918,12 +918,22 @@ namespace Ryujinx.Ui
private void Exit_Pressed(object sender, EventArgs args)
{
- End(_emulationContext);
+ if (!_gameLoaded || GtkDialog.CreateExitDialog())
+ {
+ End(_emulationContext);
+ }
}
private void Window_Close(object sender, DeleteEventArgs args)
{
- End(_emulationContext);
+ if (!_gameLoaded || GtkDialog.CreateExitDialog())
+ {
+ End(_emulationContext);
+ }
+ else
+ {
+ args.RetVal = true;
+ }
}
private void StopEmulation_Pressed(object sender, EventArgs args)