0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 02:15:49 +00:00

Show confirmation dialog when attempting to close while a game is loaded (#1582)

This commit is contained in:
Xpl0itR 2020-10-10 00:06:48 +01:00 committed by GitHub
parent 8506b7a334
commit ce87650d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)