From b9c7a62d4fcf3ff62171a30c23e3b3324c6bc020 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 15 Jan 2008 11:23:34 +0000 Subject: [PATCH] Debugging GameWindow.Exit() sequence on Mono. --- Source/OpenTK/GameWindow.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 146dac99..96a1980c 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -156,7 +156,7 @@ namespace OpenTK public virtual void Exit() { isExiting = true; - UpdateFrame += GameWindow_UpdateFrame; + UpdateFrame += CallExitInternal; } #endregion @@ -168,12 +168,13 @@ namespace OpenTK /// void ExitInternal() { + Debug.Print("Firing GameWindowExitException"); throw new GameWindowExitException(); } - void GameWindow_UpdateFrame(GameWindow sender, UpdateFrameEventArgs e) + void CallExitInternal(GameWindow sender, UpdateFrameEventArgs e) { - UpdateFrame -= GameWindow_UpdateFrame; + UpdateFrame -= CallExitInternal; sender.ExitInternal(); } @@ -555,7 +556,7 @@ namespace OpenTK } catch (GameWindowExitException) { - Trace.WriteLine("Exiting main loop."); + Trace.WriteLine("GameWindowExitException caught - exiting main loop."); } finally {