fix broken detection of desktop resolution on linux
This commit is contained in:
@@ -56,7 +56,7 @@ namespace OpenRA.GameRules
|
||||
{
|
||||
public string Renderer = "Gl";
|
||||
public WindowMode Mode = WindowMode.PseudoFullscreen;
|
||||
public int2 FullscreenSize = new int2(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
public int2 FullscreenSize = new int2(0,0);
|
||||
public int2 WindowedSize = new int2(1024, 768);
|
||||
public readonly int2 MinResolution = new int2(800, 600);
|
||||
|
||||
|
||||
@@ -125,18 +125,11 @@ namespace OpenRA.Graphics
|
||||
|
||||
static Size GetResolution(WindowMode windowmode)
|
||||
{
|
||||
var desktopResolution = Screen.PrimaryScreen.Bounds.Size;
|
||||
var customSize = (windowmode == WindowMode.Windowed)
|
||||
var size = (windowmode == WindowMode.Windowed)
|
||||
? Game.Settings.Graphics.WindowedSize
|
||||
: Game.Settings.Graphics.FullscreenSize;
|
||||
|
||||
if (customSize.X > 0 && customSize.Y > 0)
|
||||
{
|
||||
desktopResolution.Width = customSize.X;
|
||||
desktopResolution.Height = customSize.Y;
|
||||
}
|
||||
|
||||
return desktopResolution;
|
||||
return new Size(size.X, size.Y);
|
||||
}
|
||||
|
||||
static IGraphicsDevice CreateDevice( Assembly rendererDll, int width, int height, WindowMode window, bool vsync )
|
||||
|
||||
Reference in New Issue
Block a user