diff options
Diffstat (limited to 'Ryujinx/Ui/Program.cs')
-rw-r--r-- | Ryujinx/Ui/Program.cs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Ryujinx/Ui/Program.cs b/Ryujinx/Ui/Program.cs index a0de2e9f..7acf73a5 100644 --- a/Ryujinx/Ui/Program.cs +++ b/Ryujinx/Ui/Program.cs @@ -18,11 +18,11 @@ namespace Ryujinx IAalOutput AudioOut = new OpenALAudioOut(); - Switch Ns = new Switch(Renderer, AudioOut); + Switch Device = new Switch(Renderer, AudioOut); - Config.Read(Ns); + Config.Read(Device); - Ns.Log.Updated += ConsoleLog.PrintLog; + Device.Log.Updated += ConsoleLog.PrintLog; if (args.Length == 1) { @@ -39,20 +39,20 @@ namespace Ryujinx { Console.WriteLine("Loading as cart with RomFS."); - Ns.LoadCart(args[0], RomFsFiles[0]); + Device.LoadCart(args[0], RomFsFiles[0]); } else { Console.WriteLine("Loading as cart WITHOUT RomFS."); - Ns.LoadCart(args[0]); + Device.LoadCart(args[0]); } } else if (File.Exists(args[0])) { Console.WriteLine("Loading as homebrew."); - Ns.LoadProgram(args[0]); + Device.LoadProgram(args[0]); } } else @@ -60,18 +60,14 @@ namespace Ryujinx Console.WriteLine("Please specify the folder with the NSOs/IStorage or a NSO/NRO."); } - using (GLScreen Screen = new GLScreen(Ns, Renderer)) + using (GLScreen Screen = new GLScreen(Device, Renderer)) { - Ns.Finish += (Sender, Args) => - { - Screen.Exit(); - }; - Screen.MainLoop(); - Ns.OnFinish(EventArgs.Empty); + + Device.Dispose(); } - Environment.Exit(0); + AudioOut.Dispose(); } } } |