2

我已经构建并部署了由 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);
    }
}
4

1 回答 1

6

这实际上是设计使然,而不是您做错了什么。

请参阅MSDN此博客

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

于 2009-10-25T19:42:33.380 回答