-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #361 from DarthAffe/SDK/Corsair
Added GameController as Core device type; Updated Corsair SDK to 4.0.84
- Loading branch information
Showing
12 changed files
with
220 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace RGB.NET.Core; | ||
|
||
/// <summary> | ||
/// Represents a gamecontroller-device | ||
/// </summary> | ||
public interface IGameController: IRGBDevice | ||
{ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ public enum CorsairChannelDeviceType | |
Pump = 9, | ||
DRAM = 10, | ||
WaterBlock = 11, | ||
FanQX = 12, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
RGB.NET.Devices.Corsair/GameController/CorsairGameControllerRGBDevice.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
20 changes: 20 additions & 0 deletions
20
RGB.NET.Devices.Corsair/GameController/CorsairGameControllerRGBDeviceInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj.DotSettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters