XNA更改窗口大小不工作

问题描述:

我试图根据这个改变窗口的大小:XNA更改窗口大小不工作

How do I set the window/screen size in xna?

然而,它似乎并没有产生任何影响。

graphics = new GraphicsDeviceManager(this); 
    graphics.PreferredBackBufferHeight = 300; 
    graphics.PreferredBackBufferHeight = 500; 

我把它放在构造函数中。有任何想法吗?

你仅设置高度,设置宽度太

graphics.PreferredBackBufferWidth = 300;

graphics.PreferredBackBufferHeight = 500;

+0

哇发生了什么是它的意思是第二个值的宽度,所以高度保持恢复到它的默认值(500)。 – ksandarusi 2012-02-20 16:20:32