From a906a7014652fd342a260482bb336fc04a2c2e8a Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 10 Aug 2009 11:36:26 +0000 Subject: [PATCH] Merged fix for issue [#1074]: " X11XrandrDisplayDevice on Xming ---> Argument is out of range." from 0.9.8 branch. --- Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs b/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs index 317c7889..01e30020 100644 --- a/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs +++ b/Source/OpenTK/Platform/X11/X11XrandrDisplayDevice.cs @@ -67,7 +67,9 @@ namespace OpenTK.Platform.X11 // "Screens and Graphics" does report these modes, though. foreach (short rate in rates) { - if (rate != 0) + // Note: some X servers (like Xming on Windows) do not report any rates other than 0. + // If we only have 1 rate, add it even if it is 0. + if (rate != 0 || rates.Length == 1) foreach (int depth in depths) available_res.Add(new DisplayResolution(0, 0, size.Width, size.Height, depth, (float)rate)); }