Comment out exception throw when device fails to disable

Seems to be necessary so DS4 does not get permanently disabled.
Experienced while running Broforce. Related to issue #172.
This commit is contained in:
Travis Nickles 2018-01-10 15:27:39 -06:00
parent 1ac7b79a10
commit b71b3ec820

View File

@ -296,10 +296,13 @@ namespace DS4Windows
throw new Exception("Error setting class install params, error code = " + Marshal.GetLastWin32Error()); throw new Exception("Error setting class install params, error code = " + Marshal.GetLastWin32Error());
} }
success = NativeMethods.SetupDiCallClassInstaller(NativeMethods.DIF_PROPERTYCHANGE, deviceInfoSet, ref deviceInfoData); success = NativeMethods.SetupDiCallClassInstaller(NativeMethods.DIF_PROPERTYCHANGE, deviceInfoSet, ref deviceInfoData);
if (!success) // TEST: If previous SetupDiCallClassInstaller fails, just continue
// otherwise device will likely get permanently disabled.
/*if (!success)
{ {
throw new Exception("Error disabling device, error code = " + Marshal.GetLastWin32Error()); throw new Exception("Error disabling device, error code = " + Marshal.GetLastWin32Error());
} }
*/
//System.Threading.Thread.Sleep(50); //System.Threading.Thread.Sleep(50);
sw.Restart(); sw.Restart();