projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96ef07b
)
Prevent crash when XInput is not present
author
Rosen Iliev
<winterhell2002@gmail.com>
Wed, 30 Aug 2017 15:10:56 +0000
(18:10 +0300)
committer
GitHub
<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
patch
|
blob
|
history
diff --git
a/src/OpenTK/Platform/Windows/XInputJoystick.cs
b/src/OpenTK/Platform/Windows/XInputJoystick.cs
index bf17115c18309dd963cfb03176304e65419af9ff..23d29d2cdd975f68bf82d8fadcf821ce06030f4d 100644
(file)
--- 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