From 8e5faec07c4db0c418c485806f83b087a93d21d4 Mon Sep 17 00:00:00 2001 From: Rosen Iliev Date: Wed, 30 Aug 2017 18:10:56 +0300 Subject: [PATCH] Prevent crash when XInput is not present Now returns from the function instead of throwing an exception --- src/OpenTK/Platform/Windows/XInputJoystick.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OpenTK/Platform/Windows/XInputJoystick.cs b/src/OpenTK/Platform/Windows/XInputJoystick.cs index bf17115c..23d29d2c 100644 --- a/src/OpenTK/Platform/Windows/XInputJoystick.cs +++ b/src/OpenTK/Platform/Windows/XInputJoystick.cs @@ -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