mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-17 00:16:20 +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)
|
lock (outReportBuffer)
|
||||||
{
|
{
|
||||||
bool output = outputPendCount > 0, change = force;
|
bool output = outputPendCount > 0, change = force;
|
||||||
|
bool haptime = output || standbySw.ElapsedMilliseconds >= 4000L;
|
||||||
|
|
||||||
if (usingBT)
|
if (usingBT)
|
||||||
{
|
{
|
||||||
@ -1137,6 +1138,8 @@ namespace DS4Windows
|
|||||||
for (int i = 0, arlen = BT_OUTPUT_CHANGE_LENGTH; !change && i < arlen; i++)
|
for (int i = 0, arlen = BT_OUTPUT_CHANGE_LENGTH; !change && i < arlen; i++)
|
||||||
change = byteR[i] != byteB[i];
|
change = byteR[i] != byteB[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
haptime = haptime || change;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1157,7 +1160,8 @@ namespace DS4Windows
|
|||||||
change = byteR[i] != byteB[i];
|
change = byteR[i] != byteB[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change && audio != null)
|
haptime = haptime || change;
|
||||||
|
if (haptime && audio != null)
|
||||||
{
|
{
|
||||||
// Headphone volume levels
|
// Headphone volume levels
|
||||||
outReportBuffer[19] = outReportBuffer[20] =
|
outReportBuffer[19] = outReportBuffer[20] =
|
||||||
@ -1169,8 +1173,7 @@ namespace DS4Windows
|
|||||||
|
|
||||||
if (synchronous)
|
if (synchronous)
|
||||||
{
|
{
|
||||||
output = output || standbySw.ElapsedMilliseconds >= 4000L;
|
if (output || haptime)
|
||||||
if (output || change)
|
|
||||||
{
|
{
|
||||||
if (change)
|
if (change)
|
||||||
{
|
{
|
||||||
@ -1218,8 +1221,7 @@ namespace DS4Windows
|
|||||||
//for (int i = 0, arlen = outputReport.Length; !change && i < arlen; i++)
|
//for (int i = 0, arlen = outputReport.Length; !change && i < arlen; i++)
|
||||||
// change = outputReport[i] != outReportBuffer[i];
|
// change = outputReport[i] != outReportBuffer[i];
|
||||||
|
|
||||||
output = output || standbySw.ElapsedMilliseconds >= 4000L;
|
if (output || haptime)
|
||||||
if (output || change)
|
|
||||||
{
|
{
|
||||||
if (change)
|
if (change)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user