mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-03-23 23:38:45 +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:
parent
b0acc61618
commit
cf1cb4a329
@ -24,14 +24,25 @@ 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;
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user