monogame屏幕分辨率不正确 [英] monogame screen resolution is incorrect

查看:247
本文介绍了monogame屏幕分辨率不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Monogame或者XNA真的会在Surface Pro 3上报告错误的屏幕分辨率。

使用GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width和Height返回800 ×600,这是不正确的。所以,我无法正确设置我的游戏大小。



我一直在Acer V5上使用此代码没有问题,并且可以将游戏分辨率设置为我期望的大小。这是因为GraphicsAdapter报告了正确的屏幕尺寸。



无论是使用它还是将平板电脑与外部显示器对接,返回的分辨率都完全相同。什么错误导致了这种情况?

解决方案

这曾经是Monogame中的一个错误,并且已被修复。
$ b

如果您不是从最新的源代码构建,可能您的monogame dll中仍然存在该错误。



请参阅:
https://github.com/danzel/MonoGame/commit/0c36642129d89a12b30bcfc7d13256739d5483af


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?

解决方案

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

这篇关于monogame屏幕分辨率不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆