From 75448310ef60084fd8ec2c25858f10a1ff207f55 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 11 Nov 2007 19:28:13 +0000 Subject: [PATCH] Use GameWindowExitException to exit GameWindow now. No need for the GameWindow.Exit(); return; idiom any more. --- Source/OpenTK/GameWindow.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 3f6ab276..dd8d38d9 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -154,9 +154,7 @@ namespace OpenTK public virtual void Exit() { isExiting = true; - //throw new GameWindowExitException(); - //glWindow.Exit(); - //this.Dispose(); + throw new GameWindowExitException(); } #endregion @@ -543,8 +541,8 @@ namespace OpenTK update_time_counter = 0.0; } - if (isExiting) - break; + //if (isExiting) + // break; // Raise RenderFrame event time = render_watch.Elapsed.TotalSeconds; @@ -584,10 +582,10 @@ namespace OpenTK //} } } - //catch (GameWindowExitException e) - //{ - - //} + catch (GameWindowExitException) + { + Trace.WriteLine("GameWindow.Exit() request"); + } finally { Thread.CurrentThread.Priority = ThreadPriority.Normal;