Made execution neater

This commit is contained in:
Levi Dumas 2024-03-12 18:54:59 -05:00
parent ccf8c6b369
commit 9589d1c3a8

View file

@ -736,6 +736,14 @@ namespace Ryujinx.Ava
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
}
internal void Close()
{
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime app)
{
app.MainWindow.Close();
}
}
private void InitializeSwitchInstance()
{
// Initialize KeySet.
@ -1006,10 +1014,7 @@ namespace Ryujinx.Ava
{
if (ConfigurationState.Instance.CloseOnEmulatorStop)
{
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime app)
{
app.MainWindow.Close();
}
Close();
}
else
{