Fixed code issues

This commit is contained in:
DarthAffe committed 2021-07-31 16:59:51 +02:00
1 parent 7b0e9152fd
commit 59e11e5b82
120 files changed
+1348 -342

No files matched your search

@@ -1,5 +1,8 @@
namespace RGB.NET.Devices.Logitech
{
/// <summary>
/// Contains list of available logitech device types.
/// </summary>
public enum LogitechDeviceType
{
Keyboard = 0x0,
@@ -1,4 +1,5 @@
// ReSharper disable InconsistentNaming
#pragma warning disable 1591
namespace RGB.NET.Devices.Logitech
{
@@ -2,8 +2,14 @@
namespace RGB.NET.Devices.Logitech
{
/// <summary>
/// Contains mappings for <see cref="LedId"/> to <see cref="LogitechDeviceCaps"/>.
/// </summary>
public static class LedMappings
{
/// <summary>
/// Gets the mapping for per key devices.
/// </summary>
public static LedMapping<LogitechLedId> PerKey { get; } = new()
{
{ LedId.Keyboard_Escape, LogitechLedId.ESC },
@@ -131,11 +137,17 @@ namespace RGB.NET.Devices.Logitech
{ LedId.Keyboard_Custom1, LogitechLedId.G_BADGE },
};
/// <summary>
/// Gets the mapping for per device devices.
/// </summary>
public static LedMapping<int> Device { get; } = new()
{
{ LedId.Custom1, 0 }
};
/// <summary>
/// Gets the mapping for per zone keyboards.
/// </summary>
public static LedMapping<int> ZoneKeyboard { get; } = new()
{
{ LedId.Keyboard_Programmable1, 0 },
@@ -172,6 +184,9 @@ namespace RGB.NET.Devices.Logitech
{ LedId.Keyboard_Programmable32, 31 },
};
/// <summary>
/// Gets the mapping for per zone mice.
/// </summary>
public static LedMapping<int> ZoneMouse { get; } = new()
{
{ LedId.Mouse1, 0 },
@@ -208,6 +223,9 @@ namespace RGB.NET.Devices.Logitech
{ LedId.Mouse32, 31 },
};
/// <summary>
/// Gets the mapping for per zone headsets.
/// </summary>
public static LedMapping<int> ZoneHeadset { get; } = new()
{
{ LedId.Headset1, 0 },
@@ -244,6 +262,9 @@ namespace RGB.NET.Devices.Logitech
{ LedId.Headset32, 31 },
};
/// <summary>
/// Gets the mapping for per zone mousepads.
/// </summary>
public static LedMapping<int> ZoneMousepad { get; } = new()
{
{ LedId.Mousepad1, 0 },
@@ -280,6 +301,9 @@ namespace RGB.NET.Devices.Logitech
{ LedId.Mousepad32, 31 },
};
/// <summary>
/// Gets the mapping for per zone speakers.
/// </summary>
public static LedMapping<int> ZoneSpeaker { get; } = new()
{
{ LedId.Speaker1, 0 },
@@ -69,7 +69,7 @@ namespace RGB.NET.Devices.Logitech.Native
[DllImport("kernel32.dll")]
private static extern bool FreeLibrary(IntPtr dllHandle);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
[DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
private static extern IntPtr GetProcAddress(IntPtr dllHandle, string name);
#endregion