[X11] Improve GraphicsMode fallback (fixes issue #23)
authorthefiddler <stapostol@gmail.com>
Fri, 27 Dec 2013 12:01:21 +0000 (14:01 +0200)
committerthefiddler <stapostol@gmail.com>
Fri, 27 Dec 2013 12:01:21 +0000 (14:01 +0200)
commit0d1df413938aa2821d3cacd921d6be3a99bd97b6
treeae977e36d55d59413ce1989d720c564a55f1615a
parent88f7cd68f528195e0da14f0eb4a8c6a6a329de13
[X11] Improve GraphicsMode fallback (fixes issue #23)

When the user requests a GraphicsMode that is not directly supported
by the GPU/drivers, we should relax the requested parameters until
we find a supported mode. An exception should only be thrown when
there is no usable mode.

This makes the X11 backend match the behavior of Windows. The SDL/X11
backend works a little bit differently, in that it falls back to the
a default mode directly if the requested mode is not available. There
is nothing we can do about that.
Source/OpenTK/Platform/X11/X11GraphicsMode.cs