mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
CoolerMaster - Fix slow device updates
This commit is contained in:
parent
4927d76e21
commit
2d833fb800
@ -13,6 +13,7 @@ namespace RGB.NET.Devices.CoolerMaster
|
|||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
|
|
||||||
private CoolerMasterDevicesIndexes _deviceIndex;
|
private CoolerMasterDevicesIndexes _deviceIndex;
|
||||||
|
private _CoolerMasterColorMatrix _deviceMatrix;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -27,6 +28,9 @@ namespace RGB.NET.Devices.CoolerMaster
|
|||||||
: base(updateTrigger)
|
: base(updateTrigger)
|
||||||
{
|
{
|
||||||
this._deviceIndex = deviceIndex;
|
this._deviceIndex = deviceIndex;
|
||||||
|
this._deviceMatrix = new _CoolerMasterColorMatrix();
|
||||||
|
|
||||||
|
_deviceMatrix.KeyColor = new _CoolerMasterKeyColor[_CoolerMasterColorMatrix.ROWS, _CoolerMasterColorMatrix.COLUMNS];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -39,10 +43,10 @@ namespace RGB.NET.Devices.CoolerMaster
|
|||||||
foreach (KeyValuePair<object, Color> data in dataSet)
|
foreach (KeyValuePair<object, Color> data in dataSet)
|
||||||
{
|
{
|
||||||
(int row, int column) = ((int, int))data.Key;
|
(int row, int column) = ((int, int))data.Key;
|
||||||
_CoolerMasterSDK.SetLedColor(row, column, data.Value.GetR(), data.Value.GetG(), data.Value.GetB(), _deviceIndex);
|
_deviceMatrix.KeyColor[row, column] = new _CoolerMasterKeyColor(data.Value.GetR(), data.Value.GetG(), data.Value.GetB());
|
||||||
}
|
}
|
||||||
|
|
||||||
_CoolerMasterSDK.RefreshLed(false, _deviceIndex);
|
_CoolerMasterSDK.SetAllLedColor(_deviceMatrix, _deviceIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user