[X11] Warn when XI2Mouse is not supported.

Without the XI2 extension, mouse support will suffer significantly.
More specifically, low-level mouse events will not be available.
This commit is contained in:
thefiddler 2014-05-13 23:34:27 +02:00
parent 3febb4dda0
commit 452d61bc60

View file

@ -155,6 +155,8 @@ namespace OpenTK.Platform.X11
// Checks whether XInput2 is supported on the specified display. // Checks whether XInput2 is supported on the specified display.
// If a display is not specified, the default display is used. // If a display is not specified, the default display is used.
internal static bool IsSupported(IntPtr display) internal static bool IsSupported(IntPtr display)
{
try
{ {
if (display == IntPtr.Zero) if (display == IntPtr.Zero)
{ {
@ -180,6 +182,12 @@ namespace OpenTK.Platform.X11
} }
} }
} }
}
catch (DllNotFoundException e)
{
Debug.Print(e.ToString());
Debug.Print("XInput2 extension not supported. Mouse support will suffer.");
}
return false; return false;
} }