mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 17:29:18 +01:00
Fixed volume updating when sending timeout output reports
This commit is contained in:
parent
5ec6bcb11a
commit
df1ec44f1c
@ -1117,6 +1117,7 @@ namespace DS4Windows
|
||||
lock (outReportBuffer)
|
||||
{
|
||||
bool output = outputPendCount > 0, change = force;
|
||||
bool haptime = output || standbySw.ElapsedMilliseconds >= 4000L;
|
||||
|
||||
if (usingBT)
|
||||
{
|
||||
@ -1137,6 +1138,8 @@ namespace DS4Windows
|
||||
for (int i = 0, arlen = BT_OUTPUT_CHANGE_LENGTH; !change && i < arlen; i++)
|
||||
change = byteR[i] != byteB[i];
|
||||
}
|
||||
|
||||
haptime = haptime || change;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1157,7 +1160,8 @@ namespace DS4Windows
|
||||
change = byteR[i] != byteB[i];
|
||||
}
|
||||
|
||||
if (change && audio != null)
|
||||
haptime = haptime || change;
|
||||
if (haptime && audio != null)
|
||||
{
|
||||
// Headphone volume levels
|
||||
outReportBuffer[19] = outReportBuffer[20] =
|
||||
@ -1169,8 +1173,7 @@ namespace DS4Windows
|
||||
|
||||
if (synchronous)
|
||||
{
|
||||
output = output || standbySw.ElapsedMilliseconds >= 4000L;
|
||||
if (output || change)
|
||||
if (output || haptime)
|
||||
{
|
||||
if (change)
|
||||
{
|
||||
@ -1218,8 +1221,7 @@ namespace DS4Windows
|
||||
//for (int i = 0, arlen = outputReport.Length; !change && i < arlen; i++)
|
||||
// change = outputReport[i] != outReportBuffer[i];
|
||||
|
||||
output = output || standbySw.ElapsedMilliseconds >= 4000L;
|
||||
if (output || change)
|
||||
if (output || haptime)
|
||||
{
|
||||
if (change)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user