mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21:49 +01:00
Attempt to reset KB+M controls after unplugging controller
Related to issue #438.
This commit is contained in:
parent
3aa558c85f
commit
3bbdbe3a0f
@ -1020,6 +1020,13 @@ namespace DS4Windows
|
||||
LogDebug("X360 Controller # " + xinputIndex + " unplugged");
|
||||
}
|
||||
|
||||
// Use Task to reset device synth state and commit it
|
||||
Task.Run(() =>
|
||||
{
|
||||
Mapping.deviceState[ind].SavePrevious(true);
|
||||
Mapping.Commit(ind);
|
||||
}).Wait();
|
||||
|
||||
string removed = Properties.Resources.ControllerWasRemoved.Replace("*Mac address*", (ind + 1).ToString());
|
||||
if (device.getBattery() <= 20 &&
|
||||
device.getConnectionType() == ConnectionType.BT && !device.isCharging())
|
||||
@ -1163,14 +1170,6 @@ namespace DS4Windows
|
||||
}
|
||||
}
|
||||
|
||||
/*if (_udpServer != null)
|
||||
{
|
||||
DualShockPadMeta padDetail = new DualShockPadMeta();
|
||||
GetPadDetailForIdx(ind, ref padDetail);
|
||||
_udpServer.NewReportIncoming(ref padDetail, CurrentState[ind]);
|
||||
}
|
||||
*/
|
||||
|
||||
// Output any synthetic events.
|
||||
Mapping.Commit(ind);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user