From 1df2c5ce7f52f34bb01e392e8bc4b00cc691614a Mon Sep 17 00:00:00 2001 From: Cristian Carlesso Date: Thu, 15 Feb 2018 12:16:16 +0000 Subject: Gracefully close the app on exit (#12) * Gracefully close the app on exit * Application tear down instead of calling Environment.Exit(0); do a better tear down of the application --- Program.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Program.cs') diff --git a/Program.cs b/Program.cs index 3d4481aa..88a8a117 100644 --- a/Program.cs +++ b/Program.cs @@ -50,6 +50,10 @@ namespace Ryujinx using (GLScreen Screen = new GLScreen(Ns, Renderer)) { + Ns.Finish += (Sender, Args) => { + Screen.Exit(); + }; + Screen.Run(60.0); } -- cgit v1.2.3