mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Compare commits
4 Commits
654a7624cd
...
f8e4cc6b49
| Author | SHA1 | Date | |
|---|---|---|---|
| f8e4cc6b49 | |||
| aae509b275 | |||
| 5633f82b3b | |||
| 47770c00b8 |
8
RGB.NET.Core/Compatibility/Lock.cs
Normal file
8
RGB.NET.Core/Compatibility/Lock.cs
Normal file
@ -0,0 +1,8 @@
|
||||
#if NET8_0
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace RGB.NET.Core.Compatibility.Net8;
|
||||
|
||||
public sealed class Lock;
|
||||
|
||||
#endif
|
||||
@ -43,7 +43,7 @@ public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDe
|
||||
IRGBDeviceInfo IRGBDevice.DeviceInfo => DeviceInfo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<IColorCorrection> ColorCorrections { get; } = new List<IColorCorrection>();
|
||||
public IList<IColorCorrection> ColorCorrections { get; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the device needs to be flushed on every update.
|
||||
@ -63,7 +63,7 @@ public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDe
|
||||
#region Indexer
|
||||
|
||||
/// <inheritdoc />
|
||||
Led? IRGBDevice.this[LedId ledId] => LedMapping.TryGetValue(ledId, out Led? led) ? led : null;
|
||||
Led? IRGBDevice.this[LedId ledId] => LedMapping.GetValueOrDefault(ledId);
|
||||
|
||||
/// <inheritdoc />
|
||||
Led? IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.Boundary.Contains(location));
|
||||
|
||||
@ -154,9 +154,9 @@ public static class RectangleExtensions
|
||||
Point[] points =
|
||||
[
|
||||
rect.Location, // top left
|
||||
new Point(rect.Location.X + rect.Size.Width, rect.Location.Y), // top right
|
||||
new Point(rect.Location.X + rect.Size.Width, rect.Location.Y + rect.Size.Height), // bottom right
|
||||
new Point(rect.Location.X, rect.Location.Y + rect.Size.Height), // bottom right
|
||||
new(rect.Location.X + rect.Size.Width, rect.Location.Y), // top right
|
||||
new(rect.Location.X + rect.Size.Width, rect.Location.Y + rect.Size.Height), // bottom right
|
||||
new(rect.Location.X, rect.Location.Y + rect.Size.Height), // bottom right
|
||||
];
|
||||
|
||||
float sin = MathF.Sin(rotation.Radians);
|
||||
|
||||
@ -20,7 +20,7 @@ public sealed class ListLedGroup : AbstractLedGroup
|
||||
/// <summary>
|
||||
/// Gets the list containing the <see cref="Led"/> of this <see cref="ListLedGroup"/>.
|
||||
/// </summary>
|
||||
private readonly IList<Led> _groupLeds = new List<Led>();
|
||||
private readonly IList<Led> _groupLeds = [];
|
||||
|
||||
#endregion
|
||||
|
||||
@ -142,7 +142,7 @@ public sealed class ListLedGroup : AbstractLedGroup
|
||||
public override IList<Led> ToList()
|
||||
{
|
||||
lock (_groupLeds)
|
||||
return new List<Led>(_groupLeds);
|
||||
return [.._groupLeds];
|
||||
}
|
||||
|
||||
protected override IDisposable ToListUnsafe(out IList<Led> leds)
|
||||
|
||||
@ -40,7 +40,7 @@ public static class ConversionHelper
|
||||
public static byte[] HexToBytes(ReadOnlySpan<char> hexString)
|
||||
{
|
||||
if ((hexString.Length == 0) || ((hexString.Length % 2) != 0))
|
||||
return Array.Empty<byte>();
|
||||
return [];
|
||||
|
||||
byte[] buffer = new byte[hexString.Length / 2];
|
||||
for (int bx = 0, sx = 0; bx < buffer.Length; ++bx, ++sx)
|
||||
|
||||
@ -24,7 +24,7 @@ public static class TimerHelper
|
||||
|
||||
#region Properties & Fields
|
||||
|
||||
private static readonly object HIGH_RESOLUTION_TIMER_LOCK = new();
|
||||
private static readonly Lock HIGH_RESOLUTION_TIMER_LOCK = new();
|
||||
|
||||
private static bool _areHighResolutionTimersEnabled = false;
|
||||
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -20,8 +20,8 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
|
||||
|
||||
private readonly Stopwatch _deltaTimeCounter;
|
||||
|
||||
private readonly IList<IRGBDevice> _devices = new List<IRGBDevice>();
|
||||
private readonly IList<IUpdateTrigger> _updateTriggers = new List<IUpdateTrigger>();
|
||||
private readonly IList<IRGBDevice> _devices = [];
|
||||
private readonly IList<IUpdateTrigger> _updateTriggers = [];
|
||||
private readonly List<ILedGroup> _ledGroups = [];
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -68,7 +68,7 @@ public sealed class CustomUpdateData : ICustomUpdateData
|
||||
/// <returns>The value represented by the specified key.</returns>
|
||||
public object? this[string key]
|
||||
{
|
||||
get => _data.TryGetValue(key, out object? data) ? data : default;
|
||||
get => _data.GetValueOrDefault(key);
|
||||
set => _data[key] = value;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace RGB.NET.Core;
|
||||
|
||||
@ -14,7 +15,7 @@ public abstract class UpdateQueue<TIdentifier, TData> : AbstractReferenceCountin
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private readonly object _dataLock = new();
|
||||
private readonly Lock _dataLock = new();
|
||||
private readonly IDeviceUpdateTrigger _updateTrigger;
|
||||
private readonly Dictionary<TIdentifier, TData> _currentDataSet = [];
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ public sealed class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private readonly object _lock = new();
|
||||
private readonly Lock _lock = new();
|
||||
|
||||
private readonly CustomUpdateData? _customUpdateData;
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using AuraServiceLib;
|
||||
using RGB.NET.Core;
|
||||
|
||||
@ -17,7 +18,7 @@ public sealed class AsusDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static AsusDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -37,8 +37,8 @@ public sealed class AsusKeyboardRGBDevice : AsusRGBDevice<AsusKeyboardRGBDeviceI
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly List<AsusKeyboardExtraMapping> ExtraLedMappings =
|
||||
[
|
||||
new AsusKeyboardExtraMapping(new Regex("(ROG Zephyrus Duo 15).*?"), LedMappings.ROGZephyrusDuo15),
|
||||
new AsusKeyboardExtraMapping(new Regex("(ROG Strix G513QM).*?"), LedMappings.ROGStrixG15)
|
||||
new(new Regex("(ROG Zephyrus Duo 15).*?"), LedMappings.ROGZephyrusDuo15),
|
||||
new(new Regex("(ROG Strix G513QM).*?"), LedMappings.ROGStrixG15)
|
||||
];
|
||||
|
||||
#endregion
|
||||
|
||||
@ -36,7 +36,7 @@ public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDevi
|
||||
|
||||
#region Methods
|
||||
|
||||
private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? "Asus Keyboard" : deviceName;
|
||||
private static string GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? "Asus Keyboard" : deviceName;
|
||||
|
||||
#endregion
|
||||
}
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.CoolerMaster.Helper;
|
||||
using RGB.NET.Devices.CoolerMaster.Native;
|
||||
@ -18,7 +19,7 @@ public sealed class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static CoolerMasterDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -18,7 +18,7 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static CorsairDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -133,7 +133,7 @@ internal static unsafe class _CUESDK
|
||||
if (OperatingSystem.IsWindows())
|
||||
possibleLibraryPaths = Environment.Is64BitProcess ? CorsairDeviceProvider.PossibleX64NativePaths : CorsairDeviceProvider.PossibleX86NativePaths;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.CorsairLegacy.Native;
|
||||
|
||||
@ -19,7 +20,7 @@ public sealed class CorsairLegacyDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static CorsairLegacyDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -124,16 +124,19 @@ public class CorsairCustomRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
// LS100 Led Strips are reported as one big strip if configured in monitor mode in iCUE, 138 LEDs for dual monitor, 84 for single
|
||||
if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 138))
|
||||
return "LS100 LED Strip (dual monitor)";
|
||||
else if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 84))
|
||||
|
||||
if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 84))
|
||||
return "LS100 LED Strip (single monitor)";
|
||||
|
||||
// Any other value means an "External LED Strip" in iCUE, these are reported per-strip, 15 for short strips, 27 for long
|
||||
else if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 15))
|
||||
if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 15))
|
||||
return "LS100 LED Strip (short)";
|
||||
else if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 27))
|
||||
|
||||
if ((model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 27))
|
||||
return "LS100 LED Strip (long)";
|
||||
|
||||
// Device model is "Commander Pro" for regular LED strips
|
||||
else
|
||||
return "LED Strip";
|
||||
return "LED Strip";
|
||||
|
||||
case CorsairChannelDeviceType.DAP:
|
||||
return "DAP Fan";
|
||||
|
||||
@ -64,7 +64,7 @@ internal static class _CUESDK
|
||||
if (OperatingSystem.IsWindows())
|
||||
possibleLibraryPaths = Environment.Is64BitProcess ? CorsairLegacyDeviceProvider.PossibleX64NativePaths : CorsairLegacyDeviceProvider.PossibleX86NativePaths;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.DMX.E131;
|
||||
|
||||
@ -17,7 +18,7 @@ public sealed class DMXDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static DMXDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Layout;
|
||||
|
||||
@ -17,7 +18,7 @@ public sealed class DebugDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static DebugDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -139,7 +139,7 @@ public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefi
|
||||
getConnectedDevices.Init(LOGITECH_RECEIVER_ADDRESS, LOGITECH_GET_REGISTER_REQUEST);
|
||||
|
||||
stream.Write(getConnectedDevices.AsSpan());
|
||||
stream.Read(response.AsSpan());
|
||||
stream.ReadExactly(response.AsSpan());
|
||||
|
||||
bool wirelessNotifications = (response.Data01 & 1) == 1;
|
||||
if (!wirelessNotifications)
|
||||
@ -150,7 +150,7 @@ public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefi
|
||||
getConnectedDevices.Data1 = 1;
|
||||
|
||||
stream.Write(getConnectedDevices.AsSpan());
|
||||
stream.Read(response.AsSpan());
|
||||
stream.ReadExactly(response.AsSpan());
|
||||
|
||||
if (getConnectedDevices.FeatureIndex == 0x8f)
|
||||
{
|
||||
@ -164,7 +164,7 @@ public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefi
|
||||
getConnectedDevices.FeatureCommand = 0x02;
|
||||
|
||||
stream.Write(getConnectedDevices.AsSpan());
|
||||
stream.Read(response.AsSpan());
|
||||
stream.ReadExactly(response.AsSpan());
|
||||
int deviceCount = response.Data01;
|
||||
if (deviceCount <= 0)
|
||||
return map;
|
||||
@ -180,7 +180,7 @@ public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefi
|
||||
for (int i = 0; i < deviceCount; i++)
|
||||
{
|
||||
FapResponse devices = new();
|
||||
stream.Read(devices.AsSpan());
|
||||
stream.ReadExactly(devices.AsSpan());
|
||||
int wirelessPid = (devices.Data02 << 8) | devices.Data01;
|
||||
if (devices.DeviceIndex != 0xff)
|
||||
map.Add(wirelessPid, devices.DeviceIndex);
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using HidSharp;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Logitech.Native;
|
||||
@ -21,7 +22,7 @@ public class LogitechDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static LogitechDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -63,7 +63,7 @@ internal static class _LogitechGSDK
|
||||
if (OperatingSystem.IsWindows())
|
||||
possibleLibraryPaths = Environment.Is64BitProcess ? LogitechDeviceProvider.PossibleX64NativePaths : LogitechDeviceProvider.PossibleX86NativePaths;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Msi.Exceptions;
|
||||
using RGB.NET.Devices.Msi.Native;
|
||||
@ -18,7 +19,7 @@ public class MsiDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static MsiDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -68,7 +68,7 @@ internal static class _MsiSDK
|
||||
if (OperatingSystem.IsWindows())
|
||||
possibleLibraryPaths = Environment.Is64BitProcess ? MsiDeviceProvider.PossibleX64NativePaths : MsiDeviceProvider.PossibleX86NativePaths;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using Sanford.Multimedia.Midi;
|
||||
|
||||
@ -18,7 +19,7 @@ public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static NovationDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@ using RGB.NET.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace RGB.NET.Devices.OpenRGB;
|
||||
|
||||
@ -15,7 +16,7 @@ public sealed class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private readonly List<OpenRgbClient> _clients = [];
|
||||
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using HidSharp;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.PicoPi.Enum;
|
||||
@ -26,7 +27,7 @@ public sealed class PicoPiDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static PicoPiDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -64,7 +64,7 @@ internal static class _RazerSDK
|
||||
if (OperatingSystem.IsWindows())
|
||||
possibleLibraryPaths = Environment.Is64BitProcess ? RazerDeviceProvider.PossibleX64NativePaths : RazerDeviceProvider.PossibleX86NativePaths;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Razer.Native;
|
||||
using RGB.NET.HID;
|
||||
@ -20,7 +21,7 @@ public sealed class RazerDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static RazerDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.SteelSeries.API;
|
||||
using RGB.NET.HID;
|
||||
@ -21,7 +22,7 @@ public sealed class SteelSeriesDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static SteelSeriesDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.WLED;
|
||||
@ -23,7 +24,7 @@ public sealed class WledDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static WledDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.WS281X;
|
||||
@ -17,7 +18,7 @@ public sealed class WS281XDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static WS281XDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -64,7 +64,7 @@ internal static class _WootingSDK
|
||||
else if (OperatingSystem.IsMacOS())
|
||||
possibleLibraryPaths = WootingDeviceProvider.PossibleNativePathsMacOS;
|
||||
else
|
||||
possibleLibraryPaths = Enumerable.Empty<string>();
|
||||
possibleLibraryPaths = [];
|
||||
|
||||
return possibleLibraryPaths.Select(Environment.ExpandEnvironmentVariables);
|
||||
}
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Wooting.Enum;
|
||||
using RGB.NET.Devices.Wooting.Generic;
|
||||
@ -19,7 +20,7 @@ public sealed class WootingDeviceProvider : AbstractRGBDeviceProvider
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private static readonly object _lock = new();
|
||||
private static readonly Lock _lock = new();
|
||||
|
||||
private static WootingDeviceProvider? _instance;
|
||||
/// <summary>
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -52,6 +52,10 @@
|
||||
<DefineConstants>RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<Using Include="RGB.NET.Core.Compatibility.Net8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
|
||||
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||
|
||||
@ -308,6 +308,11 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=StaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=15b5b1f1_002D457c_002D4ca6_002Db278_002D5615aedc07d3/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static readonly fields (private)"><ElementKinds><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=236f7aa5_002D7b06_002D43ca_002Dbf2a_002D9b31bfcff09a/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=669e5282_002Dfb4b_002D4e90_002D91e7_002D07d269d04b60/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Constant fields (not private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a4f433b8_002Dabcd_002D4e55_002Da08f_002D82e78cef0f0c/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Local constants"><ElementKinds><Kind Name="LOCAL_CONSTANT" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=c873eafb_002Dd57f_002D481d_002D8c93_002D77f6863c2f88/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static readonly fields (not private)"><ElementKinds><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
@ -358,6 +363,7 @@
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
Loading…
x
Reference in New Issue
Block a user