XNA Zune HD应用程序将无法正常退出

Mik*_*all 2 xna zune zune-hd

我已经构建并部署了由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);
    }
}
Run Code Online (Sandbox Code Playgroud)

Tch*_*ami 6

这实际上是设计而不是你做错了什么.

请参阅MSDN此博客

被禁用的功能包括DRM音乐的播放以及与其他Zunes(游戏信息之外)共享内容的功能.我们这样做的原因是我们希望在您在设备上编写游戏时保持Zune的安全.我们重新启用这些功能的唯一方法是重启设备