protected override void OnUpdateFrame(FrameEventArgs e) { base.OnUpdateFrame(e); if (!GraphicsContext.IsCurrent) { MakeCurrent(); } Threading.Run(); if (_game != null) { if (!_isResuming && _game.Platform.IsActive && !ScreenReceiver.ScreenLocked) //Only call draw if an update has occured { _game.Tick(); } else if (_game.GraphicsDevice != null) { _game.GraphicsDevice.Clear(Color.Black); if (_isResuming && _resumer != null) { _resumer.Draw(); } _game.Platform.Present(); } } }
private void OnUpdateFrame(object sender, FrameEventArgs frameEventArgs) { if (!GameView.GraphicsContext.IsCurrent) { GameView.MakeCurrent(); } Threading.Run(); if (_game != null) { if (!GameView.IsResuming && _game.Platform.IsActive && !ScreenReceiver.ScreenLocked) //Only call draw if an update has occured { _game.Tick(); } else if (_game.GraphicsDevice != null) { _game.GraphicsDevice.Clear(Color.Black); if (GameView.IsResuming && Resumer != null) { Resumer.Draw(); } _game.Platform.Present(); } } }