返回Windows桌面MonoGame

时间:2018-05-26 12:11:51

标签: c# windows monogame

我已经为Windows创建了一个monogame项目但是当我使用alt + tab返回Windows桌面时,游戏屏幕变为白色并且图标消失。

我只将屏幕尺寸更改为1920 x 1080,全屏=真,Windows.title =“最后的龙”

public Game1()
{
    graphics = new GraphicsDeviceManager(this);
    Content.RootDirectory = "Content";
    graphics.PreferredBackBufferWidth = 1920;
    graphics.PreferredBackBufferHeight = 1080;
    graphics.IsFullScreen = true;
}
protected override void Initialize()
{
     // TODO: Add your initialization logic here
    this.Window.Title = "The Last Dragon";

    base.Initialize();
}

1 个答案:

答案 0 :(得分:0)

更改GraphicsDeviceManager的设置时,请务必确保应用这些更改。 在你的情况下graphics.ApplyChanges();