Prevent crash when XInput is not present
authorRosen Iliev <winterhell2002@gmail.com>
Wed, 30 Aug 2017 15:10:56 +0000 (18:10 +0300)
committerGitHub <noreply@github.com>
Wed, 30 Aug 2017 15:10:56 +0000 (18:10 +0300)
Now returns from the function instead of throwing an exception

src/OpenTK/Platform/Windows/XInputJoystick.cs

index bf17115c18309dd963cfb03176304e65419af9ff..23d29d2cdd975f68bf82d8fadcf821ce06030f4d 100644 (file)
@@ -381,7 +381,8 @@ namespace OpenTK.Platform.Windows
                 }
                 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