From a15ab408ebe75266a82bc9298c32741e5358e451 Mon Sep 17 00:00:00 2001 From: Levi Dumas Date: Tue, 12 Mar 2024 15:36:39 -0500 Subject: [PATCH] Working on close functionality --- src/Ryujinx.Gtk3/UI/MainWindow.cs | 16 ++-------------- src/Ryujinx/AppHost.cs | 11 ++++++++++- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/Ryujinx.Gtk3/UI/MainWindow.cs b/src/Ryujinx.Gtk3/UI/MainWindow.cs index 9e34c4115..8994b5c65 100644 --- a/src/Ryujinx.Gtk3/UI/MainWindow.cs +++ b/src/Ryujinx.Gtk3/UI/MainWindow.cs @@ -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) diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs index 2620ea68c..eb27ad953 100644 --- a/src/Ryujinx/AppHost.cs +++ b/src/Ryujinx/AppHost.cs @@ -1004,7 +1004,16 @@ namespace Ryujinx.Ava if (shouldExit) { - Stop(); + //if (ConfigurationState.Instance.CloseOnEmulatorStop) + //{ + // Console.WriteLine("quitting"); + //Console.WriteLine("still quitting"); + //} + //else + //{ + Stop(); + //} + } }