mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 01:39:17 +01:00
Change event check for newly opened devices
This commit is contained in:
parent
242843ab99
commit
1821658455
@ -4,10 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
|
||||||
using System.Media;
|
using System.Media;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using static DS4Windows.Global;
|
using static DS4Windows.Global;
|
||||||
|
|
||||||
namespace DS4Windows
|
namespace DS4Windows
|
||||||
{
|
{
|
||||||
public class ControlService
|
public class ControlService
|
||||||
@ -587,17 +587,16 @@ namespace DS4Windows
|
|||||||
device.getPreviousState(PreviousState[ind]);
|
device.getPreviousState(PreviousState[ind]);
|
||||||
DS4State pState = PreviousState[ind];
|
DS4State pState = PreviousState[ind];
|
||||||
|
|
||||||
if (pState.Battery != cState.Battery)
|
|
||||||
{
|
|
||||||
OnBatteryStatusChange(this, ind, cState.Battery);
|
|
||||||
//ControllerStatusChanged(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!device.firstReport && device.IsAlive())
|
if (!device.firstReport && device.IsAlive())
|
||||||
{
|
{
|
||||||
device.firstReport = true;
|
device.firstReport = true;
|
||||||
OnDeviceStatusChanged(this, ind);
|
OnDeviceStatusChanged(this, ind);
|
||||||
}
|
}
|
||||||
|
else if (pState.Battery != cState.Battery)
|
||||||
|
{
|
||||||
|
OnBatteryStatusChange(this, ind, cState.Battery);
|
||||||
|
//ControllerStatusChanged(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (getEnableTouchToggle(ind))
|
if (getEnableTouchToggle(ind))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user