mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Added GameController as Core device type; Updated Corsair SDK to 4.0.84
This commit is contained in:
1 parent
9575690efb
commit
8aaf602cdd
12 files changed
+220
-3
No files matched your search
@@ -217,6 +217,10 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
yield return new CorsairCoolerRGBDevice(new CorsairCoolerRGBDeviceInfo(device, deviceLedCount, 0), updateQueue);
|
||||
break;
|
||||
|
||||
case CorsairDeviceType.GameController:
|
||||
yield return new CorsairGameControllerRGBDevice(new CorsairGameControllerRGBDeviceInfo(device, deviceLedCount, 0), updateQueue);
|
||||
break;
|
||||
|
||||
case CorsairDeviceType.FanLedController:
|
||||
case CorsairDeviceType.LedController:
|
||||
case CorsairDeviceType.Unknown:
|
||||
@@ -264,6 +268,10 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "QL Fan"), updateQueue);
|
||||
break;
|
||||
|
||||
case CorsairChannelDeviceType.FanQX:
|
||||
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "QX Fan"), updateQueue);
|
||||
break;
|
||||
|
||||
case CorsairChannelDeviceType.EightLedSeriesFan:
|
||||
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "8-Led-Series Fan Fan"), updateQueue);
|
||||
break;
|
||||
|
||||
@@ -20,4 +20,5 @@ public enum CorsairChannelDeviceType
|
||||
Pump = 9,
|
||||
DRAM = 10,
|
||||
WaterBlock = 11,
|
||||
FanQX = 12,
|
||||
};
|
||||
@@ -76,6 +76,11 @@ public enum CorsairDeviceType : uint
|
||||
/// </summary>
|
||||
Touchbar = 0x0800,
|
||||
|
||||
/// <summary>
|
||||
/// iCUE-SDK: for game controllers
|
||||
/// </summary>
|
||||
GameController = 0x1000,
|
||||
|
||||
/// <summary>
|
||||
/// iCUE-SDK: for all devices
|
||||
/// </summary>
|
||||
|
||||
@@ -80,5 +80,10 @@ public enum CorsairLedGroup
|
||||
/// <summary>
|
||||
/// iCUE-SDK: for touchbar leds
|
||||
/// </summary>
|
||||
Touchbar = 14
|
||||
Touchbar = 14,
|
||||
|
||||
/// <summary>
|
||||
/// iCUE-SDK: for game controller leds
|
||||
/// </summary>
|
||||
GameController = 15
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
using RGB.NET.Core;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace RGB.NET.Devices.Corsair;
|
||||
|
||||
/// <inheritdoc cref="CorsairRGBDevice{TDeviceInfo}" />
|
||||
/// <summary>
|
||||
/// Represents a corsair gamecontroller.
|
||||
/// </summary>
|
||||
public sealed class CorsairGameControllerRGBDevice : CorsairRGBDevice<CorsairGameControllerRGBDeviceInfo>, IGameController
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairGameControllerRGBDevice" /> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The specific information provided by CUE for the gamecontroller</param>
|
||||
/// <param name="updateQueue">The queue used to update this device.</param>
|
||||
internal CorsairGameControllerRGBDevice(CorsairGameControllerRGBDeviceInfo info, CorsairDeviceUpdateQueue updateQueue)
|
||||
: base(info, updateQueue)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
protected override LedMapping<CorsairLedId> CreateMapping(IEnumerable<CorsairLedId> ids) => LedMappings.CreateGameControllerMapping(ids);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Corsair.Native;
|
||||
|
||||
namespace RGB.NET.Devices.Corsair;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairGameControllerRGBDevice" />.
|
||||
/// </summary>
|
||||
public sealed class CorsairGameControllerRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <inheritdoc />
|
||||
internal CorsairGameControllerRGBDeviceInfo(_CorsairDeviceInfo nativeInfo, int ledCount, int ledOffset)
|
||||
: base(RGBDeviceType.GameController, nativeInfo, ledCount, ledOffset)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -160,6 +160,7 @@ internal static class LedMappings
|
||||
internal static LedMapping<CorsairLedId> CreateMousepadMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Mousepad1);
|
||||
internal static LedMapping<CorsairLedId> CreateHeadsetMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Headset1);
|
||||
internal static LedMapping<CorsairLedId> CreateMouseMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Mouse1);
|
||||
internal static LedMapping<CorsairLedId> CreateGameControllerMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.GameController1);
|
||||
internal static LedMapping<CorsairLedId> CreateUnknownMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Unknown1);
|
||||
|
||||
internal static LedMapping<CorsairLedId> CreateMapping(IEnumerable<CorsairLedId> ids, LedId referenceId)
|
||||
|
||||
@@ -11,7 +11,7 @@ surface.Load(CorsairDeviceProvider.Instance);
|
||||
This providers requires native SDK-dlls.
|
||||
You can get them directly from Corsair at [https://github.com/CorsairOfficial/cue-sdk/releases](https://github.com/CorsairOfficial/cue-sdk/releases)
|
||||
|
||||
(Developed and tested with iCUE SDK v4.0.48)
|
||||
(Developed and tested with iCUE SDK v4.0.84)
|
||||
|
||||
Since the SDK-dlls are native it's important to use the correct architecture you're building your application for. (If in doubt you can always include both.)
|
||||
|
||||
@@ -20,7 +20,7 @@ Since the SDK-dlls are native it's important to use the correct architecture you
|
||||
|
||||
You can use other, custom paths by adding them to `CorsairDeviceProvider.PossibleX64NativePaths`.
|
||||
|
||||
### x86
|
||||
### x86 (only SDKs before v4.0.84)
|
||||
`redist\i386\iCUESDK_2019.dll` from the SDK-zip needs to be distributed as `<application-directory>\x86\iCUESDK_2019.dll` (or simply named `iCUESDK.dll`)
|
||||
|
||||
You can use other, custom paths by adding them to `CorsairDeviceProvider.PossibleX86NativePaths`.
|
||||
@@ -1,6 +1,7 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=cooler/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=fan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=gamecontroller/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=generic_005Cupdate/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=graphicscard/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=headsetstand/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
Reference in new issue
Block a user