mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
Show confirmation dialog when attempting to close while a game is loaded (#1582)
This commit is contained in:
parent
8506b7a334
commit
ce87650d81
1 changed files with 12 additions and 2 deletions
|
@ -917,14 +917,24 @@ namespace Ryujinx.Ui
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Exit_Pressed(object sender, EventArgs args)
|
private void Exit_Pressed(object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
if (!_gameLoaded || GtkDialog.CreateExitDialog())
|
||||||
{
|
{
|
||||||
End(_emulationContext);
|
End(_emulationContext);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Window_Close(object sender, DeleteEventArgs args)
|
private void Window_Close(object sender, DeleteEventArgs args)
|
||||||
|
{
|
||||||
|
if (!_gameLoaded || GtkDialog.CreateExitDialog())
|
||||||
{
|
{
|
||||||
End(_emulationContext);
|
End(_emulationContext);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
args.RetVal = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void StopEmulation_Pressed(object sender, EventArgs args)
|
private void StopEmulation_Pressed(object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue