monogame screen resolution is incorrect

醉酒当歌 提交于 2019-12-20 03:09:10

问题


Monogame, or XNA really, is reporting the wrong screen resolution on my Surface Pro 3.

Using GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width and Height returns dimensions of 800 x 600, which is incorrect. So, I cannot set up my game size correctly.

I've been using this code without problem on an Acer V5 and can set the game resolution to a size I expect. This is because the GraphicsAdapter reports the correct screen size.

Whether using it as is, or docking the tablet with an external monitor, returns exactly the same resolution. What error is causing this?


回答1:


This used to be a bug in Monogame, and was fixed.

If you are not building from the latest source code, it is possible that you still have the bug in your monogame dll.

See: https://github.com/danzel/MonoGame/commit/0c36642129d89a12b30bcfc7d13256739d5483af



来源:https://stackoverflow.com/questions/26220345/monogame-screen-resolution-is-incorrect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!