Working on close functionality

This commit is contained in:
Levi Dumas 2024-03-12 15:36:39 -05:00
parent f424eb58fd
commit a15ab408eb
2 changed files with 12 additions and 15 deletions

View file

@ -1,4 +1,3 @@
using Avalonia.Controls;
using Gtk;
using LibHac.Common;
using LibHac.Common.Keys;
@ -1444,18 +1443,7 @@ namespace Ryujinx.UI
_resumeEmulation.Sensitive = false;
UpdateMenuItem.Sensitive = true;
Logger.Warning?.Print(LogClass.Emulation, "afgadfgasgfgsjhfgdsjfgds" + ConfigurationState.Instance.CloseOnEmulatorStop.Value);
//Shutdown if "Close Ryujinx on Emulator Stop" is enabled
if (ConfigurationState.Instance.CloseOnEmulatorStop.Value)
{
Logger.Warning?.Print(LogClass.Emulation, "Shut Ryujinx down" + ConfigurationState.Instance.CloseOnEmulatorStop.Value);
UserControl.CloseWindow();
}
else
{
Logger.Warning?.Print(LogClass.Emulation, "Don't shut Ryujinx down" + ConfigurationState.Instance.CloseOnEmulatorStop.Value);
RendererWidget?.Exit();
}
RendererWidget?.Exit();
}
private void PauseEmulation_Pressed(object sender, EventArgs args)
@ -1464,7 +1452,7 @@ namespace Ryujinx.UI
_resumeEmulation.Sensitive = true;
_emulationContext.System.TogglePauseEmulation(true);
Title = TitleHelper.ActiveApplicationTitle(_emulationContext.Processes.ActiveApplication, Program.Version, "Paused");
Logger.Info?.Print(LogClass.Emulation, "Emulation was dinkleberry");
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
}
private void ResumeEmulation_Pressed(object sender, EventArgs args)

View file

@ -1004,7 +1004,16 @@ namespace Ryujinx.Ava
if (shouldExit)
{
Stop();
//if (ConfigurationState.Instance.CloseOnEmulatorStop)
//{
// Console.WriteLine("quitting");
//Console.WriteLine("still quitting");
//}
//else
//{
Stop();
//}
}
}