X11DisplayDevice - Use XRRSizes array directly if dev.Bounds is empty
authorUnknownShadow200 <unknownshadow200@gmail.com>
Mon, 7 Aug 2017 14:13:23 +0000 (00:13 +1000)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2017 14:13:23 +0000 (00:13 +1000)
commit84dc4d207cce9d8b6df555d3fd5c20e7bd30467b
treeefd6f871daeaf3c3c6e8f73043a1e58aae4feac5
parent178508ac0efa9c46d58bd6d16e2db6437da4e8cc
X11DisplayDevice - Use XRRSizes array directly if dev.Bounds is empty

Directly indexing into the array returned from XRRSizes is the way khronos recommends at https://www.khronos.org/opengl/wiki/Programming_OpenGL_in_Linux:_Changing_the_Screen_Resolution

The old way was multiplying that index by depths.Length, as an index into the available_res list. This is incorrect because it doesn't account for when a display device has multiple refresh rates.
src/OpenTK/Platform/X11/X11DisplayDevice.cs