Debugging GameWindow.Exit() sequence on Mono.

This commit is contained in:
the_fiddler 2008-01-15 11:23:34 +00:00
parent e404e9791e
commit b9c7a62d4f

View file

@ -156,7 +156,7 @@ namespace OpenTK
public virtual void Exit() public virtual void Exit()
{ {
isExiting = true; isExiting = true;
UpdateFrame += GameWindow_UpdateFrame; UpdateFrame += CallExitInternal;
} }
#endregion #endregion
@ -168,12 +168,13 @@ namespace OpenTK
/// </summary> /// </summary>
void ExitInternal() void ExitInternal()
{ {
Debug.Print("Firing GameWindowExitException");
throw new GameWindowExitException(); throw new GameWindowExitException();
} }
void GameWindow_UpdateFrame(GameWindow sender, UpdateFrameEventArgs e) void CallExitInternal(GameWindow sender, UpdateFrameEventArgs e)
{ {
UpdateFrame -= GameWindow_UpdateFrame; UpdateFrame -= CallExitInternal;
sender.ExitInternal(); sender.ExitInternal();
} }
@ -555,7 +556,7 @@ namespace OpenTK
} }
catch (GameWindowExitException) catch (GameWindowExitException)
{ {
Trace.WriteLine("Exiting main loop."); Trace.WriteLine("GameWindowExitException caught - exiting main loop.");
} }
finally finally
{ {