我已经构建并部署了由zune hd的新项目模板创建的应用程序。问题是当应用程序退出时,Zune重新启动。从PC远程调试或从设备直接运行时会发生这种情况。它在调试模式和发布中都会发生。我已经包含了基本的模板代码,但它非常通用。有人有什么想法吗?
public class DrawGame : Microsoft.Xna.Framework.Game
{
private GraphicsDeviceManager m_graphics;
private SpriteBatch m_spriteBatch;
public DrawGame()
{
m_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
TargetElapsedTime = TimeSpan.FromSeconds(1 / 30.0);
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
m_spriteBatch = new SpriteBatch(GraphicsDevice);
}
protected override void UnloadContent()
{ }
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
{
this.Exit();
}
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
m_spriteBatch.Begin();
m_spriteBatch.End();
base.Draw(gameTime);
}
}