From 0cb8a2b3d5f1d4b408e84593fba1d66c7752d6ca Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 31 Mar 2020 19:49:11 -0500 Subject: [PATCH] Temporarily establish main lightbar color after turning off lag flashing Needed for passthru mode --- DS4Windows/DS4Control/ControlService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 97253d7..5cd031b 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -1271,7 +1271,7 @@ namespace DS4Windows if (!lag[ind] && device.Latency >= flashWhenLateAt) { lag[ind] = true; - LagFlashWarning(ind, true); + LagFlashWarning(device, ind, true); /*uiContext?.Post(new SendOrPostCallback(delegate (object state) { LagFlashWarning(ind, true); @@ -1281,7 +1281,7 @@ namespace DS4Windows else if (lag[ind] && device.Latency < flashWhenLateAt) { lag[ind] = false; - LagFlashWarning(ind, false); + LagFlashWarning(device, ind, false); /*uiContext?.Post(new SendOrPostCallback(delegate (object state) { LagFlashWarning(ind, false); @@ -1391,7 +1391,7 @@ namespace DS4Windows } } - public void LagFlashWarning(int ind, bool on) + public void LagFlashWarning(DS4Device device, int ind, bool on) { if (on) { @@ -1411,6 +1411,7 @@ namespace DS4Windows LogDebug(DS4WinWPF.Properties.Resources.LatencyNotOverTen.Replace("*number*", (ind + 1).ToString())); DS4LightBar.forcelight[ind] = false; DS4LightBar.forcedFlash[ind] = 0; + device.LightBarColor = getMainColor(ind); } }