2
我已經構建並部署了由zune hd的新項目模板創建的應用程序。問題是每當應用程序退出時,Zune會重新啓動。從PC遠程調試或從設備正確運行時會發生這種情況。它發生在調試模式和發佈。我已經包含了基本的模板代碼,但它非常通用。有人有主意嗎?XNA Zune HD應用程序無法正常退出
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);
}
}
哇。這很瘋狂,但我想這就是這樣。感謝你及時的答覆。 – 2009-10-25 19:52:53
是的,@Tchami是正確的,這是通過設計,給你的Zune一個新的開始...... – studiohack 2010-10-02 19:44:56