fix broken detection of desktop resolution on linux

This commit is contained in:
Chris Forbes
2011-07-11 23:48:11 +12:00
committed by Paul Chote
parent 88d0c9238c
commit 6f477a2c14
4 changed files with 33 additions and 11 deletions

View File

@@ -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 )