Tweak disconnect routine

This commit is contained in:
Travis Nickles 2017-04-06 01:19:12 -07:00
parent 64e8a137e1
commit 51cbe22a90
2 changed files with 7 additions and 2 deletions

View File

@ -1401,7 +1401,12 @@ namespace DS4Windows
DS4Device d = ctrl.DS4Controllers[device]; DS4Device d = ctrl.DS4Controllers[device];
if (!d.Charging) if (!d.Charging)
{ {
d.DisconnectBT(); ConnectionType deviceConn = d.ConnectionType;
if (deviceConn == ConnectionType.BT)
{
d.DisconnectBT();
}
foreach (DS4Controls dc in action.trigger) foreach (DS4Controls dc in action.trigger)
{ {
DS4ControlSettings dcs = getDS4CSetting(device, dc); DS4ControlSettings dcs = getDS4CSetting(device, dc);

View File

@ -771,7 +771,7 @@ namespace DS4Windows
if (result) if (result)
{ {
IsDisconnecting = true; IsDisconnecting = true;
StopUpdate(); StopOutputUpdate();
if (Removal != null) if (Removal != null)
Removal(this, EventArgs.Empty); Removal(this, EventArgs.Empty);
} }