1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

use serial number hash as update trigger id

This commit is contained in:
Diogo Trindade 2025-06-18 19:44:29 +01:00
parent 34b04523de
commit dc6715b236
No known key found for this signature in database
GPG Key ID: 4B5B48393B9F875F

View File

@ -71,7 +71,6 @@ public sealed class WootingGrpcDeviceProvider : AbstractRGBDeviceProvider
{ {
ArgumentNullException.ThrowIfNull(_client, nameof(_client)); ArgumentNullException.ThrowIfNull(_client, nameof(_client));
int i = 0;
foreach (RgbGetConnectedDevicesResponse.Types.RgbDevice? device in _client.GetConnectedDevices(new()).Devices) foreach (RgbGetConnectedDevicesResponse.Types.RgbDevice? device in _client.GetConnectedDevices(new()).Devices)
{ {
if (device.DeviceType == RgbDeviceType.None) if (device.DeviceType == RgbDeviceType.None)
@ -79,7 +78,7 @@ public sealed class WootingGrpcDeviceProvider : AbstractRGBDeviceProvider
_client.Initialize(new RgbInitializeRequest { Id = device.Id }); _client.Initialize(new RgbInitializeRequest { Id = device.Id });
WootingGrpcUpdateQueue updateQueue = new(GetUpdateTrigger(i++), device, _client); WootingGrpcUpdateQueue updateQueue = new(GetUpdateTrigger(device.SerialNumber.GetHashCode()), device, _client);
WootingDeviceType deviceType = device.DeviceType switch WootingDeviceType deviceType = device.DeviceType switch
{ {