mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
1 Commits
v0.174
...
Peripheral
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6b2291586 |
@@ -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)
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user