Try to fix quitting error
This commit is contained in:
parent
2c32610260
commit
5859a134a8
1 changed files with 7 additions and 1 deletions
|
@ -33,6 +33,8 @@ namespace Ryujinx
|
||||||
|
|
||||||
private bool ResizeEvent;
|
private bool ResizeEvent;
|
||||||
|
|
||||||
|
private bool Quit;
|
||||||
|
|
||||||
public GLScreen(Switch Ns, IGalRenderer Renderer)
|
public GLScreen(Switch Ns, IGalRenderer Renderer)
|
||||||
: base(1280, 720,
|
: base(1280, 720,
|
||||||
new GraphicsMode(), "Ryujinx", 0,
|
new GraphicsMode(), "Ryujinx", 0,
|
||||||
|
@ -47,6 +49,8 @@ namespace Ryujinx
|
||||||
(DisplayDevice.Default.Height / 2) - (Height / 2));
|
(DisplayDevice.Default.Height / 2) - (Height / 2));
|
||||||
|
|
||||||
ResizeEvent = false;
|
ResizeEvent = false;
|
||||||
|
|
||||||
|
Quit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RenderLoop()
|
private void RenderLoop()
|
||||||
|
@ -61,7 +65,7 @@ namespace Ryujinx
|
||||||
|
|
||||||
long Ticks = 0;
|
long Ticks = 0;
|
||||||
|
|
||||||
while (!IsExiting)
|
while (!Quit && Exists && !IsExiting)
|
||||||
{
|
{
|
||||||
if (Ns.WaitFifo())
|
if (Ns.WaitFifo())
|
||||||
{
|
{
|
||||||
|
@ -369,6 +373,8 @@ namespace Ryujinx
|
||||||
|
|
||||||
protected override void OnUnload(EventArgs e)
|
protected override void OnUnload(EventArgs e)
|
||||||
{
|
{
|
||||||
|
Quit = true;
|
||||||
|
|
||||||
RenderThread.Join();
|
RenderThread.Join();
|
||||||
|
|
||||||
base.OnUnload(e);
|
base.OnUnload(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue