From 5859a134a826571d3849c9419c9a22c9fe07f2ef Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 11 Jul 2018 19:38:12 -0300 Subject: [PATCH] Try to fix quitting error --- Ryujinx/Ui/GLScreen.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs index 480695da55..aa3262f711 100644 --- a/Ryujinx/Ui/GLScreen.cs +++ b/Ryujinx/Ui/GLScreen.cs @@ -33,6 +33,8 @@ namespace Ryujinx private bool ResizeEvent; + private bool Quit; + public GLScreen(Switch Ns, IGalRenderer Renderer) : base(1280, 720, new GraphicsMode(), "Ryujinx", 0, @@ -47,6 +49,8 @@ namespace Ryujinx (DisplayDevice.Default.Height / 2) - (Height / 2)); ResizeEvent = false; + + Quit = false; } private void RenderLoop() @@ -61,7 +65,7 @@ namespace Ryujinx long Ticks = 0; - while (!IsExiting) + while (!Quit && Exists && !IsExiting) { if (Ns.WaitFifo()) { @@ -369,6 +373,8 @@ namespace Ryujinx protected override void OnUnload(EventArgs e) { + Quit = true; + RenderThread.Join(); base.OnUnload(e);