From 51cbe22a90a29181d39fae099a2f2136198bbfc6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 6 Apr 2017 01:19:12 -0700 Subject: [PATCH] Tweak disconnect routine --- DS4Windows/DS4Control/Mapping.cs | 7 ++++++- DS4Windows/DS4Library/DS4Device.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 85a3725..6f5384d 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1401,7 +1401,12 @@ namespace DS4Windows DS4Device d = ctrl.DS4Controllers[device]; if (!d.Charging) { - d.DisconnectBT(); + ConnectionType deviceConn = d.ConnectionType; + if (deviceConn == ConnectionType.BT) + { + d.DisconnectBT(); + } + foreach (DS4Controls dc in action.trigger) { DS4ControlSettings dcs = getDS4CSetting(device, dc); diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 3b2a119..cd1de47 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -771,7 +771,7 @@ namespace DS4Windows if (result) { IsDisconnecting = true; - StopUpdate(); + StopOutputUpdate(); if (Removal != null) Removal(this, EventArgs.Empty); }