This commit is contained in:
mika-n 2019-02-24 23:40:56 +02:00
commit 0da70eaf06
3 changed files with 15 additions and 6 deletions

View File

@ -404,7 +404,7 @@ namespace DS4Windows
this.On_Report(sender, e, tempIdx); this.On_Report(sender, e, tempIdx);
}; };
EventHandler<EventArgs> tempEvnt = (sender, args) => DS4Device.ReportHandler<EventArgs> tempEvnt = (sender, args) =>
{ {
DualShockPadMeta padDetail = new DualShockPadMeta(); DualShockPadMeta padDetail = new DualShockPadMeta();
GetPadDetailForIdx(tempIdx, ref padDetail); GetPadDetailForIdx(tempIdx, ref padDetail);
@ -620,7 +620,7 @@ namespace DS4Windows
this.On_Report(sender, e, tempIdx); this.On_Report(sender, e, tempIdx);
}; };
EventHandler<EventArgs> tempEvnt = (sender, args) => DS4Device.ReportHandler<EventArgs> tempEvnt = (sender, args) =>
{ {
DualShockPadMeta padDetail = new DualShockPadMeta(); DualShockPadMeta padDetail = new DualShockPadMeta();
GetPadDetailForIdx(tempIdx, ref padDetail); GetPadDetailForIdx(tempIdx, ref padDetail);
@ -1013,9 +1013,10 @@ namespace DS4Windows
private string[] tempStrings = new string[4] { string.Empty, string.Empty, string.Empty, string.Empty }; private string[] tempStrings = new string[4] { string.Empty, string.Empty, string.Empty, string.Empty };
// Called every time a new input report has arrived // Called every time a new input report has arrived
protected virtual void On_Report(object sender, EventArgs e, int ind) //protected virtual void On_Report(object sender, EventArgs e, int ind)
protected virtual void On_Report(DS4Device device, EventArgs e, int ind)
{ {
DS4Device device = (DS4Device)sender; //DS4Device device = (DS4Device)sender;
if (ind != -1) if (ind != -1)
{ {

View File

@ -184,11 +184,15 @@ namespace DS4Windows
private bool exitInputThread = false; private bool exitInputThread = false;
private object exitLocker = new object(); private object exitLocker = new object();
public event EventHandler<EventArgs> Report = null; public delegate void ReportHandler<TEventArgs>(DS4Device sender, TEventArgs args);
//public event EventHandler<EventArgs> Report = null;
public event ReportHandler<EventArgs> Report = null;
public event EventHandler<EventArgs> Removal = null; public event EventHandler<EventArgs> Removal = null;
public event EventHandler<EventArgs> SyncChange = null; public event EventHandler<EventArgs> SyncChange = null;
public event EventHandler<EventArgs> SerialChange = null; public event EventHandler<EventArgs> SerialChange = null;
public EventHandler<EventArgs> MotionEvent = null; //public EventHandler<EventArgs> MotionEvent = null;
public ReportHandler<EventArgs> MotionEvent = null;
public HidDevice HidDevice => hDevice; public HidDevice HidDevice => hDevice;
public bool IsExclusive => HidDevice.IsExclusive; public bool IsExclusive => HidDevice.IsExclusive;

View File

@ -29,6 +29,10 @@ you've used a 360 controller before)
or built in pc). Toshiba's adapters currently do not work. or built in pc). Toshiba's adapters currently do not work.
- Disable Steam Controller Mapping support in Steam - Disable Steam Controller Mapping support in Steam
## Social
[Discord](https://discord.gg/zrpPgyN)
## Device Detection Issue ## Device Detection Issue
If your DS4 is not detected by DS4Windows and the lightbar continues to If your DS4 is not detected by DS4Windows and the lightbar continues to