如何在Linux上更改MonoGame中的屏幕分辨率 [英] How do I change the screen resolution in MonoGame on Linux
本文介绍了如何在Linux上更改MonoGame中的屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!我发现了很多类似的主题。但是还没有找到解决Linux问题的方法。
Hi! I found a lot of similar themes. But have not found a solution to the problem for Linux.
public Game1 ()
{
graphics = new GraphicsDeviceManager (this);
graphics.PreferredBackBufferHeight = 600;
graphics.PreferredBackBufferWidth = 800;
Content.RootDirectory = "Content";
}
尺寸不变。有时会改变相机位置,并且照片会偏向一侧。我可以更改库OpenTK的屏幕分辨率吗?
Size does not change. Sometimes changing the camera position, and pictures goes to the side. Can I change the screen resolution the library OpenTK?
推荐答案
这是一个长期存在的错误,涉及(据我所知)OpenTk和MonoGame。目前最好的解决方案是设置Window.AllowUserResizing属性,如下所示:
This is a long standing bug that involves (as far as I can tell) OpenTk and MonoGame. Probably the best solution, for the time being, is to set the Window.AllowUserResizing property like so:
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
graphics.PreferredBackBufferWidth = 800;
graphics.PreferredBackBufferHeight = 800;
this.Window.AllowUserResizing = true;
}
请参阅此GitHub帖子进行相关讨论:
https://github.com/mono/MonoGame/issues/628 [ ^ ]
这篇关于如何在Linux上更改MonoGame中的屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文