improve xinput availability check which was broken by pointless refactors in 580aa2eaf9 (but it should be even more robust than before, now). fixes #23

This commit is contained in:
zeromus 2021-02-18 21:52:30 -05:00
parent 1fd888dcc9
commit 6b6637fbea
1 changed files with 1 additions and 2 deletions

View File

@ -58,12 +58,11 @@ namespace BizHawk.Bizware.DirectX
IsAvailable = libraryHandle != IntPtr.Zero;
// don't remove this code. it's important to catch errors on systems with broken xinput installs.
// (probably, checking for the library was adequate, but let's not get rid of this anyway)
if (IsAvailable) _ = new Controller(UserIndex.One).IsConnected;
}
catch
{
// ignored
IsAvailable = false;
}
}