From b71b3ec820e82204a8dd9059fdf4016615023645 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 10 Jan 2018 15:27:39 -0600 Subject: [PATCH] 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. --- DS4Windows/DS4Library/DS4Devices.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index 49834f1..e27c0aa 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -296,10 +296,13 @@ namespace DS4Windows throw new Exception("Error setting class install params, error code = " + Marshal.GetLastWin32Error()); } 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()); } + */ //System.Threading.Thread.Sleep(50); sw.Restart();