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();
}
}
}