mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Compare commits
No commits in common. "417b9be3f9eed26046e2695c9831421272beb2a5" and "a4bd79791223ff0c0b06c8c35378af8390ca44c3" have entirely different histories.
417b9be3f9
...
a4bd797912
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -14,11 +14,11 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
@ -26,7 +26,7 @@ jobs:
|
||||
6.0.x
|
||||
- name: Git Semantic Version
|
||||
id: versioning
|
||||
uses: PaulHatch/semantic-version@v5.4.0
|
||||
uses: PaulHatch/semantic-version@v4.0.3
|
||||
with:
|
||||
short_tags: false
|
||||
format: "${major}.${minor}.${patch}-prerelease.${increment}"
|
||||
@ -37,25 +37,25 @@ jobs:
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal --configuration Release
|
||||
- name: Upload a Build Artifact NET6
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET6
|
||||
path: bin/net6.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload a Build Artifact NET7
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET7
|
||||
path: bin/net7.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload a Build Artifact NET8
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET8
|
||||
path: bin/net8.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload Nuget Build Artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-Nugets
|
||||
path: bin/*nupkg
|
||||
|
||||
4
.github/workflows/pr_verify.yml
vendored
4
.github/workflows/pr_verify.yml
vendored
@ -10,9 +10,9 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
|
||||
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@ -13,11 +13,11 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
@ -25,7 +25,7 @@ jobs:
|
||||
6.0.x
|
||||
- name: Git Semantic Version
|
||||
id: versioning
|
||||
uses: PaulHatch/semantic-version@v5.4.0
|
||||
uses: PaulHatch/semantic-version@v4.0.3
|
||||
with:
|
||||
short_tags: false
|
||||
format: "${major}.${minor}.${patch}"
|
||||
@ -36,25 +36,25 @@ jobs:
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal --configuration Release
|
||||
- name: Upload a Build Artifact NET6
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET6
|
||||
path: bin/net6.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload a Build Artifact NET7
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET7
|
||||
path: bin/net7.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload a Build Artifact NET8
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-NET8
|
||||
path: bin/net8.0/RGB.NET.*.dll
|
||||
if-no-files-found: error
|
||||
- name: Upload Nuget Build Artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: RGB.NET-Nugets
|
||||
path: bin/*nupkg
|
||||
|
||||
@ -1,55 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace RGB.NET.Devices.Razer;
|
||||
namespace RGB.NET.Devices.Razer;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type of Razer SDK endpoint
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum RazerEndpointType
|
||||
{
|
||||
/// <summary>
|
||||
/// No endpoint
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The keyboard endpoint
|
||||
/// </summary>
|
||||
Keyboard = 1 << 0,
|
||||
Keyboard,
|
||||
|
||||
/// <summary>
|
||||
/// The laptop keyboard endpoint, shares the <see cref="Keyboard"/> endpoint but has a different LED layout
|
||||
/// </summary>
|
||||
LaptopKeyboard = 1 << 1,
|
||||
LaptopKeyboard,
|
||||
|
||||
/// <summary>
|
||||
/// The mouse endpoint
|
||||
/// </summary>
|
||||
Mouse = 1 << 2,
|
||||
Mouse,
|
||||
|
||||
/// <summary>
|
||||
/// The headset endpoint
|
||||
/// </summary>
|
||||
Headset = 1 << 3,
|
||||
Headset,
|
||||
|
||||
/// <summary>
|
||||
/// The mousepad endpoint
|
||||
/// </summary>
|
||||
Mousepad = 1 << 4,
|
||||
Mousepad,
|
||||
|
||||
/// <summary>
|
||||
/// The keypad endpoint
|
||||
/// </summary>
|
||||
Keypad = 1 << 5,
|
||||
Keypad,
|
||||
|
||||
/// <summary>
|
||||
/// The Chroma Link endpoint
|
||||
/// </summary>
|
||||
ChromaLink = 1 << 6,
|
||||
|
||||
/// <summary>
|
||||
/// All endpoints
|
||||
/// </summary>
|
||||
All = ~None
|
||||
}
|
||||
ChromaLink,
|
||||
}
|
||||
@ -50,7 +50,7 @@ public sealed class RazerDeviceProvider : AbstractRGBDeviceProvider
|
||||
/// <summary>
|
||||
/// Forces to load the devices represented by the emulator even if they aren't reported to exist.
|
||||
/// </summary>
|
||||
public RazerEndpointType LoadEmulatorDevices { get; set; } = RazerEndpointType.None;
|
||||
public bool LoadEmulatorDevices { get; set; } = false;
|
||||
|
||||
private const int VENDOR_ID = 0x1532;
|
||||
|
||||
@ -313,26 +313,21 @@ public sealed class RazerDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
DeviceDefinitions.LoadFilter = loadFilter;
|
||||
|
||||
List<IRGBDevice> devices = base.GetLoadedDevices(loadFilter).ToList();
|
||||
IList<IRGBDevice> devices = base.GetLoadedDevices(loadFilter).ToList();
|
||||
|
||||
if (LoadEmulatorDevices != RazerEndpointType.None)
|
||||
if (LoadEmulatorDevices)
|
||||
{
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Keyboard) && (LoadEmulatorDevices.HasFlag(RazerEndpointType.Keyboard) || LoadEmulatorDevices.HasFlag(RazerEndpointType.LaptopKeyboard)) && devices.All(d => d is not RazerKeyboardRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Keyboard) && devices.All(d => d is not RazerKeyboardRGBDevice))
|
||||
devices.Add(new RazerKeyboardRGBDevice(new RazerKeyboardRGBDeviceInfo("Emulator Keyboard", RazerEndpointType.Keyboard), GetUpdateTrigger(), LedMappings.Keyboard));
|
||||
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Mouse) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Mouse) && devices.All(d => d is not RazerMouseRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Mouse) && devices.All(d => d is not RazerMouseRGBDevice))
|
||||
devices.Add(new RazerMouseRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Mouse, RazerEndpointType.Mouse, "Emulator Mouse"), GetUpdateTrigger(), LedMappings.Mouse));
|
||||
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Headset) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Headset) && devices.All(d => d is not RazerHeadsetRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Headset) && devices.All(d => d is not RazerHeadsetRGBDevice))
|
||||
devices.Add(new RazerHeadsetRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Headset, RazerEndpointType.Headset, "Emulator Headset"), GetUpdateTrigger()));
|
||||
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Mousepad) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Mousepad) && devices.All(d => d is not RazerMousepadRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Mousepad) && devices.All(d => d is not RazerMousepadRGBDevice))
|
||||
devices.Add(new RazerMousepadRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Mousepad, RazerEndpointType.Mousepad, "Emulator Mousepad"), GetUpdateTrigger()));
|
||||
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Keypad) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Keypad) && devices.All(d => d is not RazerMousepadRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Keypad) && devices.All(d => d is not RazerMousepadRGBDevice))
|
||||
devices.Add(new RazerKeypadRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Keypad, RazerEndpointType.Keypad, "Emulator Keypad"), GetUpdateTrigger()));
|
||||
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Unknown) && LoadEmulatorDevices.HasFlag(RazerEndpointType.ChromaLink) && devices.All(d => d is not RazerChromaLinkRGBDevice))
|
||||
if (loadFilter.HasFlag(RGBDeviceType.Unknown) && devices.All(d => d is not RazerChromaLinkRGBDevice))
|
||||
devices.Add(new RazerChromaLinkRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Unknown, RazerEndpointType.ChromaLink, "Emulator Chroma Link"), GetUpdateTrigger()));
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.SteelSeries.API;
|
||||
@ -78,7 +78,6 @@ public sealed class SteelSeriesDeviceProvider : AbstractRGBDeviceProvider
|
||||
{ 0x1614, RGBDeviceType.Keyboard, "Apex Pro TKL", LedMappings.KeyboardTklMappingUk, SteelSeriesDeviceType.PerKey },
|
||||
{ 0x2036, RGBDeviceType.Keyboard, "MSI Notebook", LedMappings.KeyboardNotebookMappingUk, SteelSeriesDeviceType.PerKey },
|
||||
{ 0x113A, RGBDeviceType.Keyboard, "MSI GE78HX", LedMappings.KeyboardMSIGE78Mapping, SteelSeriesDeviceType.PerKey },
|
||||
{ 0x1122, RGBDeviceType.Keyboard, "MSI Notebook", LedMappings.KeyboardNotebookMappingUk, SteelSeriesDeviceType.PerKey },
|
||||
|
||||
//Headsets
|
||||
{ 0x12AA, RGBDeviceType.Headset, "Arctis 5", LedMappings.HeadsetTwoZone, SteelSeriesDeviceType.TwoZone },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user