put CreateGameWindow on a new thread and stopped destroying the main menu when a game loads
This commit is contained in:
parent
982215c66f
commit
6c814accbe
1 changed files with 30 additions and 56 deletions
|
@ -10,6 +10,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx
|
namespace Ryujinx
|
||||||
{
|
{
|
||||||
|
@ -86,18 +87,11 @@ namespace Ryujinx
|
||||||
|
|
||||||
if (args.Length == 1)
|
if (args.Length == 1)
|
||||||
{
|
{
|
||||||
Box.Remove(GameTableWindow);
|
//Box.Remove(GameTableWindow);
|
||||||
|
|
||||||
LoadApplication(args[0]);
|
LoadApplication(args[0]);
|
||||||
|
|
||||||
using (GlScreen screen = new GlScreen(_device, _renderer))
|
new Thread(new ThreadStart(CreateGameWindow)).Start();
|
||||||
{
|
|
||||||
screen.MainLoop();
|
|
||||||
|
|
||||||
Profile.FinishProfiling();
|
|
||||||
|
|
||||||
_device.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -227,6 +221,22 @@ namespace Ryujinx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateGameWindow()
|
||||||
|
{
|
||||||
|
using (GlScreen screen = new GlScreen(_device, _renderer))
|
||||||
|
{
|
||||||
|
screen.MainLoop();
|
||||||
|
|
||||||
|
Profile.FinishProfiling();
|
||||||
|
|
||||||
|
_device.Dispose();
|
||||||
|
|
||||||
|
_audioOut.Dispose();
|
||||||
|
|
||||||
|
Logger.Shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Events
|
//Events
|
||||||
private void Row_Activated(object obj, RowActivatedArgs args)
|
private void Row_Activated(object obj, RowActivatedArgs args)
|
||||||
{
|
{
|
||||||
|
@ -235,22 +245,10 @@ namespace Ryujinx
|
||||||
|
|
||||||
LoadApplication(path);
|
LoadApplication(path);
|
||||||
|
|
||||||
Box.Remove(GameTableWindow);
|
//Box.Remove(GameTableWindow);
|
||||||
Box.Add(GlScreen);
|
//Box.Add(GlScreen);
|
||||||
|
|
||||||
Destroy();
|
new Thread(new ThreadStart(CreateGameWindow)).Start();
|
||||||
|
|
||||||
using (GlScreen screen = new GlScreen(_device, _renderer))
|
|
||||||
{
|
|
||||||
screen.MainLoop();
|
|
||||||
|
|
||||||
Profile.FinishProfiling();
|
|
||||||
|
|
||||||
_device.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_audioOut.Dispose();
|
|
||||||
Logger.Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Load_Application_File(object o, EventArgs args)
|
private void Load_Application_File(object o, EventArgs args)
|
||||||
|
@ -267,22 +265,10 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
LoadApplication(fc.Filename);
|
LoadApplication(fc.Filename);
|
||||||
|
|
||||||
Box.Remove(GameTableWindow);
|
//Box.Remove(GameTableWindow);
|
||||||
Box.Add(GlScreen);
|
//Box.Add(GlScreen);
|
||||||
|
|
||||||
Destroy();
|
new Thread(new ThreadStart(CreateGameWindow)).Start();
|
||||||
|
|
||||||
using (GlScreen screen = new GlScreen(_device, _renderer))
|
|
||||||
{
|
|
||||||
screen.MainLoop();
|
|
||||||
|
|
||||||
Profile.FinishProfiling();
|
|
||||||
|
|
||||||
_device.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_audioOut.Dispose();
|
|
||||||
Logger.Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fc.Destroy();
|
fc.Destroy();
|
||||||
|
@ -296,22 +282,10 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
LoadApplication(fc.Filename);
|
LoadApplication(fc.Filename);
|
||||||
|
|
||||||
Box.Remove(GameTableWindow);
|
//Box.Remove(GameTableWindow);
|
||||||
Box.Add(GlScreen);
|
//Box.Add(GlScreen);
|
||||||
|
|
||||||
Destroy();
|
new Thread(new ThreadStart(CreateGameWindow)).Start();
|
||||||
|
|
||||||
using (GlScreen screen = new GlScreen(_device, _renderer))
|
|
||||||
{
|
|
||||||
screen.MainLoop();
|
|
||||||
|
|
||||||
Profile.FinishProfiling();
|
|
||||||
|
|
||||||
_device.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_audioOut.Dispose();
|
|
||||||
Logger.Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fc.Destroy();
|
fc.Destroy();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue