Merged fix for issue [#1074]: " X11XrandrDisplayDevice on Xming ---> Argument is out of range." from 0.9.8 branch.
This commit is contained in:
parent
fbab14bb7a
commit
a906a70146
1 changed files with 3 additions and 1 deletions
|
@ -67,7 +67,9 @@ namespace OpenTK.Platform.X11
|
||||||
// "Screens and Graphics" does report these modes, though.
|
// "Screens and Graphics" does report these modes, though.
|
||||||
foreach (short rate in rates)
|
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)
|
foreach (int depth in depths)
|
||||||
available_res.Add(new DisplayResolution(0, 0, size.Width, size.Height, depth, (float)rate));
|
available_res.Add(new DisplayResolution(0, 0, size.Width, size.Height, depth, (float)rate));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue