Prevent crash when XInput is not present

Now returns from the function instead of throwing an exception
This commit is contained in:
Rosen Iliev 2017-08-30 18:10:56 +03:00 committed by GitHub
parent 96ef07b229
commit 8e5faec07c

View file

@ -381,7 +381,8 @@ namespace OpenTK.Platform.Windows
} }
if (dll == IntPtr.Zero) if (dll == IntPtr.Zero)
{ {
throw new NotSupportedException("XInput was not found on this platform"); //XInput was not found on this platform
return;
} }
// Load the entry points we are interested in from that dll // Load the entry points we are interested in from that dll