diff --git a/app/Peripherals/Mouse/AsusMouse.cs b/app/Peripherals/Mouse/AsusMouse.cs index 79cc0736..2733e3d1 100644 --- a/app/Peripherals/Mouse/AsusMouse.cs +++ b/app/Peripherals/Mouse/AsusMouse.cs @@ -1,5 +1,6 @@ using GHelper.AnimeMatrix.Communication; using GHelper.AnimeMatrix.Communication.Platform; +using GHelper.Input; using System.Runtime.CompilerServices; using System.Text; @@ -1744,6 +1745,17 @@ namespace GHelper.Peripherals.Mouse } } + public void SetColor(Color color) + { + var ls = new LightingSetting(); + ls.RGBColor = color; + ls.Brightness = InputDispatcher.GetBacklight() * 25; + + WriteForResponse(GetUpdateLightingModePacket(ls, LightingZone.All)); + WriteForResponse(GetSaveProfilePacket()); + + } + public void SetLightingSetting(LightingSetting lightingSetting, LightingZone zone) { if (!HasRGB() || lightingSetting is null) diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index 6f0609c3..38df87d5 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -1,6 +1,7 @@ using GHelper.Gpu; using GHelper.Helpers; using GHelper.Input; +using GHelper.Peripherals; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Runtime.InteropServices; @@ -767,6 +768,12 @@ namespace GHelper.USB { if (isStrix) ApplyDirect(AmbientData.result, init); else ApplyDirect(AmbientData.result[0], init); + + foreach (var mouse in PeripheralsProvider.ConnectedMice) + { + mouse.SetColor(AmbientData.result[0]); + } + } }