Skip to content

Commit

Permalink
add Razer Chroma SDK Service check for RazerRgbNetDevice.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Jul 10, 2024
1 parent 6277fd3 commit a42a1f0
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Common.Devices;
using AuroraDeviceManager.Utils;
using Common.Devices;
using RGB.NET.Core;
using RGB.NET.Devices.Razer;

namespace AuroraDeviceManager.Devices.RGBNet.Implementations;
Expand All @@ -12,6 +14,12 @@ public class RazerRgbNetDevice : RgbNetDevice
protected override async Task ConfigureProvider(CancellationToken cancellationToken)
{
await base.ConfigureProvider(cancellationToken);

var isRazerServiceRunning = ProcessUtils.IsProcessRunning("rzsdkservice");
if (!isRazerServiceRunning)
{
throw new DeviceProviderException(new ApplicationException("Razer Chroma SDK Service is not running!"), false);
}

var loadDevices = RazerEndpointType.None;
if (Global.DeviceConfig.VarRegistry.GetVariable<bool>($"{DeviceName}_force_all"))
Expand Down

0 comments on commit a42a1f0

Please sign in to comment.