How to resize window using XNA

前端 未结 2 899
故里飘歌
故里飘歌 2020-12-03 00:12

I know this question has been asked many times before. However, all solutions I have found after over an hour of googling are essentially the same thing. Everyone says that

2条回答
  •  醉话见心
    2020-12-03 00:31

    The GraphicsDevice.Viewport width and height by default on my computer is 800x480, try setting a size above that that will be noticeable - like 1024x768.

    graphics.PreferredBackBufferHeight = 768;
    graphics.PreferredBackBufferWidth = 1024;
    graphics.ApplyChanges();
    

    The above code in Initialize was sufficient to expand the window for me.

提交回复
热议问题