I'm just wondering, while making a game, I noticed that the GameTime value for IsRunningSlowly returns false when my game has focus (like it should), but when I change applications, it changes to true. I even made a empty game, and even when it losses focus, the GameTime value for IsRunningSlowly returns true as well. I'm wondering why does it do this? Is it just my computer, or did the creators of XNA design it this way? The frame rate seems fine, but the value is true. No big deal really, I'm just really curious!
[Empty Game]
public class Game1 : Microsoft.Xna.Framework.Game
{
#region Constuctors
public Game1()
{
this.GraphicsManager = new Microsoft.Xna.Framework.GraphicsDeviceManager(this);
this.Content.RootDirectory = "Content";
}
#endregion
#region Overrides
protected override void LoadContent()
{
this.SpriteBatch = new Microsoft.Xna.Framework.Graphics.SpriteBatch(this.GraphicsDevice);
base.LoadContent();
}
protected override void Update(Microsoft.Xna.Framework.GameTime GameTime)
{
System.Console.WriteLine(GameTime.IsRunningSlowly);
Microsoft.Xna.Framework.Input.KeyboardState Keyboard = Microsoft.Xna.Framework.Input.Keyboard.GetState();
if (Keyboard.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) this.Exit();
base.Update(GameTime);
}
protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
{
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.CornflowerBlue);
base.Draw(gameTime);
}
#endregion
#region Variables
private Microsoft.Xna.Framework.GraphicsDeviceManager GraphicsManager { get; set; }
private Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch { get; set; }
#endregion
}