From a1e99344d2ffd71bb902011328507660bb5256fc Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 28 Jan 2018 23:21:49 -0600 Subject: [PATCH] Allow ScpVBus device to be found even when disabled. Reset device rumble state on next poll when loading a profile. --- DS4Windows/DS4Control/ScpUtil.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 7277d1c..a033c4c 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -302,7 +302,7 @@ namespace DS4Windows var dataBuffer = new byte[4096]; ulong propertyType = 0; var requiredSize = 0; - IntPtr deviceInfoSet = NativeMethods.SetupDiGetClassDevs(ref sysGuid, "", 0, NativeMethods.DIGCF_PRESENT | NativeMethods.DIGCF_DEVICEINTERFACE | NativeMethods.DIGCF_ALLCLASSES); + IntPtr deviceInfoSet = NativeMethods.SetupDiGetClassDevs(ref sysGuid, "", 0, NativeMethods.DIGCF_DEVICEINTERFACE | NativeMethods.DIGCF_ALLCLASSES); for (int i = 0; !result && NativeMethods.SetupDiEnumDeviceInfo(deviceInfoSet, i, ref deviceInfoData); i++) { if (NativeMethods.SetupDiGetDeviceProperty(deviceInfoSet, ref deviceInfoData, ref NativeMethods.DEVPKEY_Device_HardwareIds, ref propertyType, @@ -2807,6 +2807,8 @@ namespace DS4Windows Log.LogToGui("X360 Controller # " + xinputIndex + " unplugged", false); } } + + tempDev.setRumble(0, 0); }); Program.rootHub.touchPad[device]?.ResetTrackAccel(trackballFriction[device]);