Skip to content

Commit

Permalink
Fixed SonyWA disconnect on Windows 7
Browse files Browse the repository at this point in the history
Was broken since 1.6.4 with change to sending
output packets
Ryochan7 committed Mar 13, 2019
1 parent a7192d2 commit b536ca3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions DS4Windows/DS4Library/DS4Device.cs
Original file line number Diff line number Diff line change
@@ -735,6 +735,7 @@ private unsafe void performDs4Input()
ds4InactiveFrame = true;
idleInput = true;
bool syncWriteReport = conType != ConnectionType.BT;
bool forceWrite = false;

int maxBatteryValue = 0;
int tempBattery = 0;
@@ -1022,7 +1023,14 @@ private unsafe void performDs4Input()
{
runCalib = synced = controllerSynced;
SyncChange?.Invoke(this, EventArgs.Empty);
sendOutputReport(true, true);
if (synced)
{
forceWrite = true;
}
else
{
standbySw.Reset();
}
}
}

@@ -1101,7 +1109,8 @@ private unsafe void performDs4Input()
if (Report != null)
Report(this, EventArgs.Empty);

sendOutputReport(syncWriteReport);
sendOutputReport(syncWriteReport, forceWrite);
forceWrite = false;

if (!string.IsNullOrEmpty(currerror))
error = currerror;

0 comments on commit b536ca3

Please sign in to comment.