Make sure to dispose MainWindow

This commit is contained in:
Thog 2020-01-17 17:50:20 +01:00
commit 1c31be1398
2 changed files with 4 additions and 3 deletions

View file

@ -43,7 +43,6 @@ namespace Ryujinx
ConfigurationState.Instance.ToFileFormat().SaveConfig(configurationPath); ConfigurationState.Instance.ToFileFormat().SaveConfig(configurationPath);
} }
Profile.Initialize(); Profile.Initialize();
Application.Init(); Application.Init();

View file

@ -239,7 +239,7 @@ namespace Ryujinx.Ui
HLE.Switch device = InitializeSwitchInstance(); HLE.Switch device = InitializeSwitchInstance();
// TODO: Move this somewhere else + reloadable? // TODO: Move this somewhere else + reloadable?
Ryujinx.Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath; Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
if (Directory.Exists(path)) if (Directory.Exists(path))
{ {
@ -359,7 +359,7 @@ namespace Ryujinx.Ui
} }
} }
private static void End(HLE.Switch device) private void End(HLE.Switch device)
{ {
if (_ending) if (_ending)
{ {
@ -373,6 +373,8 @@ namespace Ryujinx.Ui
UpdateGameMetadata(device.System.TitleIdText); UpdateGameMetadata(device.System.TitleIdText);
} }
Dispose();
Profile.FinishProfiling(); Profile.FinishProfiling();
device?.Dispose(); device?.Dispose();
DiscordIntegrationModule.Exit(); DiscordIntegrationModule.Exit();