Found a way to make usage check work.

Related to issue #498.
This commit is contained in:
Travis Nickles 2018-11-26 10:04:26 -06:00
parent 5ef3fc76cf
commit 532444de48

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
@ -55,7 +54,8 @@ namespace DS4Windows
for (int j = 0; !found && j < devInfoLen; j++)
{
VidPidInfo tempInfo = devInfo[j];
if (tempDev.Attributes.VendorId == tempInfo.vid &&
if (tempDev.Capabilities.Usage == 0x05 &&
tempDev.Attributes.VendorId == tempInfo.vid &&
tempDev.Attributes.ProductId == tempInfo.pid)
{
found = true;