mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Added GameController as Core device type; Updated Corsair SDK to 4.0.84
This commit is contained in:
parent
9575690efb
commit
8aaf602cdd
@ -93,6 +93,11 @@ public enum RGBDeviceType
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
LedController = 1 << 15,
|
LedController = 1 << 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a game controller.
|
||||||
|
/// </summary>
|
||||||
|
GameController = 1 << 16,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a device where the type is not known or not present in the list.
|
/// Represents a device where the type is not known or not present in the list.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
7
RGB.NET.Core/Devices/TypeInterfaces/IGameController.cs
Normal file
7
RGB.NET.Core/Devices/TypeInterfaces/IGameController.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace RGB.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a gamecontroller-device
|
||||||
|
/// </summary>
|
||||||
|
public interface IGameController: IRGBDevice
|
||||||
|
{ }
|
||||||
@ -6294,6 +6294,136 @@ public enum LedId
|
|||||||
Cooler127 = 0x00D0007F,
|
Cooler127 = 0x00D0007F,
|
||||||
Cooler128 = 0x00D00080,
|
Cooler128 = 0x00D00080,
|
||||||
|
|
||||||
|
/*### GameController ###*/
|
||||||
|
GameController1 = 0x00E00001,
|
||||||
|
GameController2 = 0x00E00002,
|
||||||
|
GameController3 = 0x00E00003,
|
||||||
|
GameController4 = 0x00E00004,
|
||||||
|
GameController5 = 0x00E00005,
|
||||||
|
GameController6 = 0x00E00006,
|
||||||
|
GameController7 = 0x00E00007,
|
||||||
|
GameController8 = 0x00E00008,
|
||||||
|
GameController9 = 0x00E00009,
|
||||||
|
GameController10 = 0x00E0000A,
|
||||||
|
GameController11 = 0x00E0000B,
|
||||||
|
GameController12 = 0x00E0000C,
|
||||||
|
GameController13 = 0x00E0000D,
|
||||||
|
GameController14 = 0x00E0000E,
|
||||||
|
GameController15 = 0x00E0000F,
|
||||||
|
GameController16 = 0x00E00010,
|
||||||
|
GameController17 = 0x00E00011,
|
||||||
|
GameController18 = 0x00E00012,
|
||||||
|
GameController19 = 0x00E00013,
|
||||||
|
GameController20 = 0x00E00014,
|
||||||
|
GameController21 = 0x00E00015,
|
||||||
|
GameController22 = 0x00E00016,
|
||||||
|
GameController23 = 0x00E00017,
|
||||||
|
GameController24 = 0x00E00018,
|
||||||
|
GameController25 = 0x00E00019,
|
||||||
|
GameController26 = 0x00E0001A,
|
||||||
|
GameController27 = 0x00E0001B,
|
||||||
|
GameController28 = 0x00E0001C,
|
||||||
|
GameController29 = 0x00E0001D,
|
||||||
|
GameController30 = 0x00E0001E,
|
||||||
|
GameController31 = 0x00E0001F,
|
||||||
|
GameController32 = 0x00E00020,
|
||||||
|
GameController33 = 0x00E00021,
|
||||||
|
GameController34 = 0x00E00022,
|
||||||
|
GameController35 = 0x00E00023,
|
||||||
|
GameController36 = 0x00E00024,
|
||||||
|
GameController37 = 0x00E00025,
|
||||||
|
GameController38 = 0x00E00026,
|
||||||
|
GameController39 = 0x00E00027,
|
||||||
|
GameController40 = 0x00E00028,
|
||||||
|
GameController41 = 0x00E00029,
|
||||||
|
GameController42 = 0x00E0002A,
|
||||||
|
GameController43 = 0x00E0002B,
|
||||||
|
GameController44 = 0x00E0002C,
|
||||||
|
GameController45 = 0x00E0002D,
|
||||||
|
GameController46 = 0x00E0002E,
|
||||||
|
GameController47 = 0x00E0002F,
|
||||||
|
GameController48 = 0x00E00030,
|
||||||
|
GameController49 = 0x00E00031,
|
||||||
|
GameController50 = 0x00E00032,
|
||||||
|
GameController51 = 0x00E00033,
|
||||||
|
GameController52 = 0x00E00034,
|
||||||
|
GameController53 = 0x00E00035,
|
||||||
|
GameController54 = 0x00E00036,
|
||||||
|
GameController55 = 0x00E00037,
|
||||||
|
GameController56 = 0x00E00038,
|
||||||
|
GameController57 = 0x00E00039,
|
||||||
|
GameController58 = 0x00E0003A,
|
||||||
|
GameController59 = 0x00E0003B,
|
||||||
|
GameController60 = 0x00E0003C,
|
||||||
|
GameController61 = 0x00E0003D,
|
||||||
|
GameController62 = 0x00E0003E,
|
||||||
|
GameController63 = 0x00E0003F,
|
||||||
|
GameController64 = 0x00E00040,
|
||||||
|
GameController65 = 0x00E00041,
|
||||||
|
GameController66 = 0x00E00042,
|
||||||
|
GameController67 = 0x00E00043,
|
||||||
|
GameController68 = 0x00E00044,
|
||||||
|
GameController69 = 0x00E00045,
|
||||||
|
GameController70 = 0x00E00046,
|
||||||
|
GameController71 = 0x00E00047,
|
||||||
|
GameController72 = 0x00E00048,
|
||||||
|
GameController73 = 0x00E00049,
|
||||||
|
GameController74 = 0x00E0004A,
|
||||||
|
GameController75 = 0x00E0004B,
|
||||||
|
GameController76 = 0x00E0004C,
|
||||||
|
GameController77 = 0x00E0004D,
|
||||||
|
GameController78 = 0x00E0004E,
|
||||||
|
GameController79 = 0x00E0004F,
|
||||||
|
GameController80 = 0x00E00050,
|
||||||
|
GameController81 = 0x00E00051,
|
||||||
|
GameController82 = 0x00E00052,
|
||||||
|
GameController83 = 0x00E00053,
|
||||||
|
GameController84 = 0x00E00054,
|
||||||
|
GameController85 = 0x00E00055,
|
||||||
|
GameController86 = 0x00E00056,
|
||||||
|
GameController87 = 0x00E00057,
|
||||||
|
GameController88 = 0x00E00058,
|
||||||
|
GameController89 = 0x00E00059,
|
||||||
|
GameController90 = 0x00E0005A,
|
||||||
|
GameController91 = 0x00E0005B,
|
||||||
|
GameController92 = 0x00E0005C,
|
||||||
|
GameController93 = 0x00E0005D,
|
||||||
|
GameController94 = 0x00E0005E,
|
||||||
|
GameController95 = 0x00E0005F,
|
||||||
|
GameController96 = 0x00E00060,
|
||||||
|
GameController97 = 0x00E00061,
|
||||||
|
GameController98 = 0x00E00062,
|
||||||
|
GameController99 = 0x00E00063,
|
||||||
|
GameController100 = 0x00E00064,
|
||||||
|
GameController101 = 0x00E00065,
|
||||||
|
GameController102 = 0x00E00066,
|
||||||
|
GameController103 = 0x00E00067,
|
||||||
|
GameController104 = 0x00E00068,
|
||||||
|
GameController105 = 0x00E00069,
|
||||||
|
GameController106 = 0x00E0006A,
|
||||||
|
GameController107 = 0x00E0006B,
|
||||||
|
GameController108 = 0x00E0006C,
|
||||||
|
GameController109 = 0x00E0006D,
|
||||||
|
GameController110 = 0x00E0006E,
|
||||||
|
GameController111 = 0x00E0006F,
|
||||||
|
GameController112 = 0x00E00070,
|
||||||
|
GameController113 = 0x00E00071,
|
||||||
|
GameController114 = 0x00E00072,
|
||||||
|
GameController115 = 0x00E00073,
|
||||||
|
GameController116 = 0x00E00074,
|
||||||
|
GameController117 = 0x00E00075,
|
||||||
|
GameController118 = 0x00E00076,
|
||||||
|
GameController119 = 0x00E00077,
|
||||||
|
GameController120 = 0x00E00078,
|
||||||
|
GameController121 = 0x00E00079,
|
||||||
|
GameController122 = 0x00E0007A,
|
||||||
|
GameController123 = 0x00E0007B,
|
||||||
|
GameController124 = 0x00E0007C,
|
||||||
|
GameController125 = 0x00E0007D,
|
||||||
|
GameController126 = 0x00E0007E,
|
||||||
|
GameController127 = 0x00E0007F,
|
||||||
|
GameController128 = 0x00E00080,
|
||||||
|
|
||||||
/*### Custom ###*/
|
/*### Custom ###*/
|
||||||
Custom1 = 0x0FE00001,
|
Custom1 = 0x0FE00001,
|
||||||
Custom2 = 0x0FE00002,
|
Custom2 = 0x0FE00002,
|
||||||
|
|||||||
@ -217,6 +217,10 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
|||||||
yield return new CorsairCoolerRGBDevice(new CorsairCoolerRGBDeviceInfo(device, deviceLedCount, 0), updateQueue);
|
yield return new CorsairCoolerRGBDevice(new CorsairCoolerRGBDeviceInfo(device, deviceLedCount, 0), updateQueue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CorsairDeviceType.GameController:
|
||||||
|
yield return new CorsairGameControllerRGBDevice(new CorsairGameControllerRGBDeviceInfo(device, deviceLedCount, 0), updateQueue);
|
||||||
|
break;
|
||||||
|
|
||||||
case CorsairDeviceType.FanLedController:
|
case CorsairDeviceType.FanLedController:
|
||||||
case CorsairDeviceType.LedController:
|
case CorsairDeviceType.LedController:
|
||||||
case CorsairDeviceType.Unknown:
|
case CorsairDeviceType.Unknown:
|
||||||
@ -264,6 +268,10 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
|||||||
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "QL Fan"), updateQueue);
|
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "QL Fan"), updateQueue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CorsairChannelDeviceType.FanQX:
|
||||||
|
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "QX Fan"), updateQueue);
|
||||||
|
break;
|
||||||
|
|
||||||
case CorsairChannelDeviceType.EightLedSeriesFan:
|
case CorsairChannelDeviceType.EightLedSeriesFan:
|
||||||
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "8-Led-Series Fan Fan"), updateQueue);
|
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "8-Led-Series Fan Fan"), updateQueue);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -20,4 +20,5 @@ public enum CorsairChannelDeviceType
|
|||||||
Pump = 9,
|
Pump = 9,
|
||||||
DRAM = 10,
|
DRAM = 10,
|
||||||
WaterBlock = 11,
|
WaterBlock = 11,
|
||||||
|
FanQX = 12,
|
||||||
};
|
};
|
||||||
@ -76,6 +76,11 @@ public enum CorsairDeviceType : uint
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Touchbar = 0x0800,
|
Touchbar = 0x0800,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// iCUE-SDK: for game controllers
|
||||||
|
/// </summary>
|
||||||
|
GameController = 0x1000,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// iCUE-SDK: for all devices
|
/// iCUE-SDK: for all devices
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -80,5 +80,10 @@ public enum CorsairLedGroup
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// iCUE-SDK: for touchbar leds
|
/// iCUE-SDK: for touchbar leds
|
||||||
/// </summary>
|
/// </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> CreateMousepadMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Mousepad1);
|
||||||
internal static LedMapping<CorsairLedId> CreateHeadsetMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Headset1);
|
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> 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> CreateUnknownMapping(IEnumerable<CorsairLedId> ids) => CreateMapping(ids, LedId.Unknown1);
|
||||||
|
|
||||||
internal static LedMapping<CorsairLedId> CreateMapping(IEnumerable<CorsairLedId> ids, LedId referenceId)
|
internal static LedMapping<CorsairLedId> CreateMapping(IEnumerable<CorsairLedId> ids, LedId referenceId)
|
||||||
|
|||||||
@ -11,7 +11,7 @@ surface.Load(CorsairDeviceProvider.Instance);
|
|||||||
This providers requires native SDK-dlls.
|
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)
|
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.)
|
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`.
|
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`)
|
`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`.
|
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">
|
<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/=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/=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/=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/=graphicscard/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=headsetstand/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=headsetstand/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user