1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2026-03-24 07:48:46 +00:00

Fix - Updated constructor of LogitechPerKeyRGBDevice to initialise LED layout (using AddLed() with placeholder grid layout) so all per-key Logitech keyboards report their LEDs.

This commit is contained in:
MegaBytesMe 2026-03-18 22:31:53 +00:00
parent b0acc61618
commit cf1cb4a329

View File

@ -24,12 +24,23 @@ public sealed class LogitechPerKeyRGBDevice : LogitechRGBDevice<LogitechRGBDevic
: base(info, updateQueue)
{
this._ledMapping = ledMapping;
InitializeLayout();
}
#endregion
#region Methods
private void InitializeLayout()
{
foreach ((LedId ledId, LogitechLedId mapping) in _ledMapping)
{
// TODO: Impove layout (curently places them in a grid)
AddLed(ledId, new Point(0, 0), new Size(10, 10));
}
}
/// <inheritdoc />
protected override object GetLedCustomData(LedId ledId) => _ledMapping.TryGetValue(ledId, out LogitechLedId logitechLedId) ? logitechLedId : -1;