Edd*_*ker 78
根据经验,我发现在XNA 4.0中我需要使用
GraphicsDevice.Viewport.Width
GraphicsDevice.Viewport.Height
Run Code Online (Sandbox Code Playgroud)
在运行窗口模式时,我找到了
GraphicsDevice.DisplayMode.Width
GraphicsDevice.DisplayMode.Height
Run Code Online (Sandbox Code Playgroud)
给了我整个屏幕的分辨率.
希望这有助于其他人.
Adr*_*ore 59
这似乎是它(我自己用google搜索"xna屏幕宽度高度"):
GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
Run Code Online (Sandbox Code Playgroud)