/// <summary> /// Handles a frame of the main game loop. /// </summary> void HandleFrame() { try { // If the game has not been created yet, just don't do anything if (_game == null) { return; } // If the game is running, handle the next frame. Otherwise, close the form. if (!_game.IsDisposed) { _game.HandleFrame(); } else { Close(); } } catch (Exception ex) { ExceptionSwallower.Instance.Swallow(ex); if (ExceptionSwallower.Instance.Rethrow) { throw; } } }
/// <summary> /// Handles a frame of the main game loop. /// </summary> void HandleFrame() { //TODO: find out why exception swalloer causes issues // try // { // If the game has not been created yet, just don't do anything if (_game == null) { return; } // If the game is running, handle the next frame. Otherwise, close the form. if (!_game.IsDisposed) { _game.HandleFrame(); } else { Close(); } // } // catch (Exception ex) //{ // ExceptionSwallower.Instance.Swallow(ex); // if (ExceptionSwallower.Instance.Rethrow) // throw; // } }