Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 #418

Merged
merged 66 commits into from
Feb 8, 2025
Merged

v3 #418

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
5cb5962
remove System.Management dependency
Aytackydln Jun 14, 2023
cadf966
Merge branch 'Development' of https://github.com/DarthAffe/RGB.NET in…
Aytackydln Aug 7, 2023
c11965e
Merge branch 'Development' of https://github.com/DarthAffe/RGB.NET in…
Aytackydln Dec 6, 2023
1bd5b54
pull
Aytackydln Dec 6, 2023
8b1c592
Merge branch 'Development' of https://github.com/DarthAffe/RGB.NET in…
Aytackydln Jan 1, 2024
83d1b24
Added detection for a razer and a stellseries device
DarthAffe May 27, 2024
f4cf5c3
Merge pull request #386 from DarthAffe/DeviceDetection
DarthAffe May 27, 2024
ed7ff76
Added detection for SteelSeries Apex 3
DarthAffe Jun 10, 2024
bc7c237
Merge pull request #388 from DarthAffe/DeviceDetection
DarthAffe Jun 10, 2024
5a13fce
Added media-keys and underglow-leds to razer-mapping; Correctly named…
DarthAffe Jun 22, 2024
da2c2a6
Merge pull request #390 from DarthAffe/RazerKeyboardMapping
DarthAffe Jun 22, 2024
f21acbd
Fixed potential performance issue with for-loops when Spans are passe…
DarthAffe Jun 22, 2024
6f07115
Removed unnecessary in GetByteValueFromPercentage
DarthAffe Jun 22, 2024
41a1d5d
Merge pull request #391 from DarthAffe/SmallPerformanceThings
DarthAffe Jun 22, 2024
5e895f5
Merge remote-tracking branch 'refs/remotes/origin/Development' into a…
Jul 2, 2024
9f0c3be
Added Razer Leviathan V2 X Speakers
logicallysynced Jul 7, 2024
976ee6d
Added BlackWidow V4 Mini HyperSpeed
logicallysynced Jul 7, 2024
9de1233
Update RGB.NET.Devices.Razer/RazerDeviceProvider.cs
DarthAffe Jul 7, 2024
4e80764
Merge pull request #393 from roxaskeyheart/patch-4
DarthAffe Jul 7, 2024
d207fdf
Add Wooting 80HE support
diogotr7 Jul 20, 2024
c398499
(MAJOR) Removed all in paramters as their performance impact is too h…
DarthAffe Jul 21, 2024
fdfd35e
Merge pull request #394 from diogotr7/feature/wooting-80he
DarthAffe Jul 21, 2024
3e53b51
Removed support for old .NETs
DarthAffe Jul 21, 2024
4c3875e
Fixed a doc comment
DarthAffe Jul 21, 2024
b1cf26b
Added support for HPPH-images in presets
DarthAffe Jul 21, 2024
0d41314
Merge pull request #395 from DarthAffe/SmallPerformanceThings
DarthAffe Jul 21, 2024
cfbbdc6
Changed ImageTexture Image to be public
DarthAffe Jul 21, 2024
681adcb
Merge pull request #396 from DarthAffe/HPPH
DarthAffe Jul 21, 2024
1396e97
Fixed doc-comment mistake
DarthAffe Jul 21, 2024
9a99769
Updated build-files
DarthAffe Jul 21, 2024
9346948
Merge pull request #397 from DarthAffe/HPPH
DarthAffe Jul 21, 2024
54b4eac
Update OpenRGB.NET
diogotr7 Jul 28, 2024
13a5a61
Merge pull request #398 from diogotr7/feature/openrgb-fix
DarthAffe Jul 28, 2024
466d136
Added pid for Razer Firefly v2 Pro
DarthAffe Sep 20, 2024
2bf081d
Merge pull request #400 from DarthAffe/Devices/Razer
DarthAffe Sep 21, 2024
c34435b
Remove CustomUpdateData heap allocation in OnUpdate hot path. Added C…
stonstad Oct 12, 2024
7cfe089
Fixed incorrect 80he international keys
diogotr7 Oct 17, 2024
5c864a0
Merge pull request #404 from diogotr7/feature/80he-layout-fixes
DarthAffe Oct 17, 2024
f249103
Fixed crash in logitech device provider, when multiple lightspeed dev…
DarthAffe Oct 20, 2024
a0198e3
Merge pull request #405 from DarthAffe/LogitechMultipleDevicesFix
DarthAffe Oct 20, 2024
54c09a1
Fixed default name for Asus Keyboards
DarthAffe Oct 20, 2024
a26eaf9
Merge pull request #335 from Aytackydln/asus-remove-system-management
DarthAffe Oct 20, 2024
da51871
Update RGB.NET.Core/Update/CustomUpdateData.cs
stonstad Oct 30, 2024
71f1115
Merge pull request #403 from stonstad/Contributions
DarthAffe Nov 3, 2024
aa7bfd3
Added Razer Chroma Wireless ARGB Controller support
Nick026 Nov 29, 2024
f8a530e
Fixed mapping for StellSeries Apex 3
DarthAffe Dec 1, 2024
505e5c6
Merge pull request #409 from DarthAffe/SteelSeriesMapping
DarthAffe Dec 3, 2024
a2a25bc
Update SteelSeriesDeviceProvider.cs for Apex Pro TKL Wireless Gen3
harrisck Dec 29, 2024
197be1f
Merge pull request #408 from Nick026/Development
DarthAffe Dec 30, 2024
1d47894
Added .net9 build target
DarthAffe Jan 3, 2025
39da0fd
Updated dependencies
DarthAffe Jan 3, 2025
ed98714
Added logitech G915 X (TKL)
DarthAffe Jan 14, 2025
9945a5f
Updated build-scripts to net9
DarthAffe Jan 14, 2025
77f55d2
Added additional Razer & SteelSeries devices
logicallysynced Jan 17, 2025
12a3535
Added SteelSeries Arena 9
DarthAffe Feb 6, 2025
d97293e
Merge pull request #414 from logicallysynced/device-additions
DarthAffe Feb 6, 2025
899fc69
Merge pull request #413 from DarthAffe/LogitechPids
DarthAffe Feb 6, 2025
e151b3f
Merge branch 'Development' into patch-1
DarthAffe Feb 6, 2025
f34033a
Merge pull request #410 from harrisck/patch-1
DarthAffe Feb 6, 2025
f40190d
Updated dependencies
DarthAffe Feb 6, 2025
f9fefe4
Merge pull request #416 from DarthAffe/SteelSeriesPids
DarthAffe Feb 6, 2025
654a762
Merge pull request #412 from DarthAffe/net9
DarthAffe Feb 6, 2025
47770c0
Used new collection-initialization
DarthAffe Feb 8, 2025
5633f82
Changed locks to use the new Lock-type for .net9
DarthAffe Feb 8, 2025
aae509b
More code issues fixed
DarthAffe Feb 8, 2025
f8e4cc6
Merge pull request #417 from DarthAffe/LanguageUsage
DarthAffe Feb 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,19 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }}-prerelease.${{ github.event.inputs.increment }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6
- name: Upload a Build Artifact NET9
uses: actions/[email protected]
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/[email protected]
with:
name: RGB.NET-NET7
path: bin/net7.0/RGB.NET.*.dll
name: RGB.NET-NET9
path: bin/net9.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET8
uses: actions/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,19 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6
- name: Upload a Build Artifact NET9
uses: actions/[email protected]
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/[email protected]
with:
name: RGB.NET-NET7
path: bin/net7.0/RGB.NET.*.dll
name: RGB.NET-NET9
path: bin/net9.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET8
uses: actions/[email protected]
Expand All @@ -58,6 +51,6 @@ jobs:
with:
tag_name: v${{ github.event.inputs.version }}
generate_release_notes: true
files: bin/net8.0/RGB.NET.*.dll
files: bin/net9.0/RGB.NET.*.dll
- name: Nuget Push
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
10 changes: 5 additions & 5 deletions RGB.NET.Core/Color/Behaviors/DefaultColorBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ public sealed class DefaultColorBehavior : IColorBehavior
/// Converts the individual byte values of this <see cref="Color"/> to a human-readable string.
/// </summary>
/// <returns>A string that contains the individual byte values of this <see cref="Color"/>. For example "[A: 255, R: 255, G: 0, B: 0]".</returns>
public string ToString(in Color color) => $"[A: {color.GetA()}, R: {color.GetR()}, G: {color.GetG()}, B: {color.GetB()}]";
public string ToString(Color color) => $"[A: {color.GetA()}, R: {color.GetR()}, G: {color.GetG()}, B: {color.GetB()}]";

/// <summary>
/// Tests whether the specified object is a <see cref="Color" /> and is equivalent to this <see cref="Color" />.
/// </summary>
/// <param name="color">The color to test.</param>
/// <param name="obj">The object to test.</param>
/// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="Color" /> equivalent to this <see cref="Color" />; otherwise, <c>false</c>.</returns>
public bool Equals(in Color color, object? obj) => obj is Color color2 && Equals(color, color2);
public bool Equals(Color color, object? obj) => obj is Color color2 && Equals(color, color2);

/// <summary>
/// Tests whether the specified object is a <see cref="Color" /> and is equivalent to this <see cref="Color" />.
/// </summary>
/// <param name="color">The first color to test.</param>
/// <param name="color2">The second color to test.</param>
/// <returns><c>true</c> if <paramref name="color2" /> equivalent to this <see cref="Color" />; otherwise, <c>false</c>.</returns>
public bool Equals(in Color color, in Color color2) => color.A.EqualsInTolerance(color2.A)
public bool Equals(Color color, Color color2) => color.A.EqualsInTolerance(color2.A)
&& color.R.EqualsInTolerance(color2.R)
&& color.G.EqualsInTolerance(color2.G)
&& color.B.EqualsInTolerance(color2.B);
Expand All @@ -39,14 +39,14 @@ public bool Equals(in Color color, in Color color2) => color.A.EqualsInTolerance
/// Returns a hash code for this <see cref="Color" />.
/// </summary>
/// <returns>An integer value that specifies the hash code for this <see cref="Color" />.</returns>
public int GetHashCode(in Color color) => HashCode.Combine(color.A, color.R, color.G, color.B);
public int GetHashCode(Color color) => HashCode.Combine(color.A, color.R, color.G, color.B);

/// <summary>
/// Blends a <see cref="Color"/> over this color.
/// </summary>
/// <param name="baseColor">The <see cref="Color"/> to to blend over.</param>
/// <param name="blendColor">The <see cref="Color"/> to blend.</param>
public Color Blend(in Color baseColor, in Color blendColor)
public Color Blend(Color baseColor, Color blendColor)
{
if (blendColor.A.EqualsInTolerance(0)) return baseColor;

Expand Down
10 changes: 5 additions & 5 deletions RGB.NET.Core/Color/Behaviors/IColorBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@ public interface IColorBehavior
/// </summary>
/// <param name="color">The color to convert.</param>
/// <returns>The string representation of the specified color.</returns>
string ToString(in Color color);
string ToString(Color color);

/// <summary>
/// Tests whether the specified object is a <see cref="Color" /> and is equivalent to this <see cref="Color" />.
/// </summary>
/// <param name="color">The color to test.</param>
/// <param name="obj">The object to test.</param>
/// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="Color" /> equivalent to this <see cref="Color" />; otherwise, <c>false</c>.</returns>
bool Equals(in Color color, object? obj);
bool Equals(Color color, object? obj);

/// <summary>
/// Tests whether the specified object is a <see cref="Color" /> and is equivalent to this <see cref="Color" />.
/// </summary>
/// <param name="color">The first color to test.</param>
/// <param name="color2">The second color to test.</param>
/// <returns><c>true</c> if <paramref name="color2" /> equivalent to this <see cref="Color" />; otherwise, <c>false</c>.</returns>
bool Equals(in Color color, in Color color2);
bool Equals(Color color, Color color2);

/// <summary>
/// Returns a hash code for this <see cref="Color" />.
/// </summary>
/// <returns>An integer value that specifies the hash code for this <see cref="Color" />.</returns>
int GetHashCode(in Color color);
int GetHashCode(Color color);

/// <summary>
/// Blends a <see cref="Color"/> over this color.
/// </summary>
/// <param name="baseColor">The <see cref="Color"/> to to blend over.</param>
/// <param name="blendColor">The <see cref="Color"/> to blend.</param>
Color Blend(in Color baseColor, in Color blendColor);
Color Blend(Color baseColor, Color blendColor);
}
10 changes: 5 additions & 5 deletions RGB.NET.Core/Color/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public Color(float a, float r, float g, float b)
/// Initializes a new instance of the <see cref="T:RGB.NET.Core.Color" /> struct by cloning a existing <see cref="T:RGB.NET.Core.Color" />.
/// </summary>
/// <param name="color">The <see cref="T:RGB.NET.Core.Color" /> the values are copied from.</param>
public Color(in Color color)
public Color(Color color)
: this(color.A, color.R, color.G, color.B)
{ }

Expand Down Expand Up @@ -214,7 +214,7 @@ public Color(in Color color)
/// Blends a <see cref="Color"/> over this color, as defined by the current <see cref="Behavior"/>.
/// </summary>
/// <param name="color">The <see cref="Color"/> to blend.</param>
public Color Blend(in Color color) => Behavior.Blend(this, color);
public Color Blend(Color color) => Behavior.Blend(this, color);

#endregion

Expand All @@ -226,23 +226,23 @@ public Color(in Color color)
/// <param name="color1">The base color.</param>
/// <param name="color2">The color to blend.</param>
/// <returns>The blended color.</returns>
public static Color operator +(in Color color1, in Color color2) => color1.Blend(color2);
public static Color operator +(Color color1, Color color2) => color1.Blend(color2);

/// <summary>
/// Returns a value that indicates whether two specified <see cref="Color" /> are equal.
/// </summary>
/// <param name="color1">The first <see cref="Color" /> to compare.</param>
/// <param name="color2">The second <see cref="Color" /> to compare.</param>
/// <returns><c>true</c> if <paramref name="color1" /> and <paramref name="color2" /> are equal; otherwise, <c>false</c>.</returns>
public static bool operator ==(in Color color1, in Color color2) => color1.Equals(color2);
public static bool operator ==(Color color1, Color color2) => color1.Equals(color2);

/// <summary>
/// Returns a value that indicates whether two specified <see cref="Color" /> are equal.
/// </summary>
/// <param name="color1">The first <see cref="Color" /> to compare.</param>
/// <param name="color2">The second <see cref="Color" /> to compare.</param>
/// <returns><c>true</c> if <paramref name="color1" /> and <paramref name="color2" /> are not equal; otherwise, <c>false</c>.</returns>
public static bool operator !=(in Color color1, in Color color2) => !(color1 == color2);
public static bool operator !=(Color color1, Color color2) => !(color1 == color2);

/// <summary>
/// Converts a <see cref="ValueTuple"/> of ARGB-components to a <see cref="Color"/>.
Expand Down
18 changes: 9 additions & 9 deletions RGB.NET.Core/Color/HSVColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ public static class HSVColor
/// </summary>
/// <param name="color">The color to get the value from.</param>
/// <returns>The hue component value of the color.</returns>
public static float GetHue(this in Color color) => color.GetHSV().hue;
public static float GetHue(this Color color) => color.GetHSV().hue;

/// <summary>
/// Gets the saturation component value (HSV-color space) of this <see cref="Color"/> in the range [0..1].
/// </summary>
/// <param name="color">The color to get the value from.</param>
/// <returns>The saturation component value of the color.</returns>
public static float GetSaturation(this in Color color) => color.GetHSV().saturation;
public static float GetSaturation(this Color color) => color.GetHSV().saturation;

/// <summary>
/// Gets the value component value (HSV-color space) of this <see cref="Color"/> in the range [0..1].
/// </summary>
/// <param name="color">The color to get the value from.</param>
/// <returns>The value component value of the color.</returns>
public static float GetValue(this in Color color) => color.GetHSV().value;
public static float GetValue(this Color color) => color.GetHSV().value;

/// <summary>
/// Gets the hue, saturation and value component values (HSV-color space) of this <see cref="Color"/>.
Expand All @@ -40,7 +40,7 @@ public static class HSVColor
/// </summary>
/// <param name="color">The color to get the value from.</param>
/// <returns>A tuple containing the hue, saturation and value component value of the color.</returns>
public static (float hue, float saturation, float value) GetHSV(this in Color color)
public static (float hue, float saturation, float value) GetHSV(this Color color)
=> CaclulateHSVFromRGB(color.R, color.G, color.B);

#endregion
Expand All @@ -55,7 +55,7 @@ public static (float hue, float saturation, float value) GetHSV(this in Color co
/// <param name="saturation">The saturation value to add.</param>
/// <param name="value">The value value to add.</param>
/// <returns>The new color after the modification.</returns>
public static Color AddHSV(this in Color color, float hue = 0, float saturation = 0, float value = 0)
public static Color AddHSV(this Color color, float hue = 0, float saturation = 0, float value = 0)
{
(float cHue, float cSaturation, float cValue) = color.GetHSV();
return Create(color.A, cHue + hue, cSaturation + saturation, cValue + value);
Expand All @@ -69,7 +69,7 @@ public static Color AddHSV(this in Color color, float hue = 0, float saturation
/// <param name="saturation">The saturation value to subtract.</param>
/// <param name="value">The value value to subtract.</param>
/// <returns>The new color after the modification.</returns>
public static Color SubtractHSV(this in Color color, float hue = 0, float saturation = 0, float value = 0)
public static Color SubtractHSV(this Color color, float hue = 0, float saturation = 0, float value = 0)
{
(float cHue, float cSaturation, float cValue) = color.GetHSV();
return Create(color.A, cHue - hue, cSaturation - saturation, cValue - value);
Expand All @@ -83,7 +83,7 @@ public static Color SubtractHSV(this in Color color, float hue = 0, float satura
/// <param name="saturation">The saturation value to multiply.</param>
/// <param name="value">The value value to multiply.</param>
/// <returns>The new color after the modification.</returns>
public static Color MultiplyHSV(this in Color color, float hue = 1, float saturation = 1, float value = 1)
public static Color MultiplyHSV(this Color color, float hue = 1, float saturation = 1, float value = 1)
{
(float cHue, float cSaturation, float cValue) = color.GetHSV();
return Create(color.A, cHue * hue, cSaturation * saturation, cValue * value);
Expand All @@ -97,7 +97,7 @@ public static Color MultiplyHSV(this in Color color, float hue = 1, float satura
/// <param name="saturation">The saturation value to divide.</param>
/// <param name="value">The value value to divide.</param>
/// <returns>The new color after the modification.</returns>
public static Color DivideHSV(this in Color color, float hue = 1, float saturation = 1, float value = 1)
public static Color DivideHSV(this Color color, float hue = 1, float saturation = 1, float value = 1)
{
(float cHue, float cSaturation, float cValue) = color.GetHSV();
return Create(color.A, cHue / hue, cSaturation / saturation, cValue / value);
Expand All @@ -111,7 +111,7 @@ public static Color DivideHSV(this in Color color, float hue = 1, float saturati
/// <param name="saturation">The saturation value to set.</param>
/// <param name="value">The value value to set.</param>
/// <returns>The new color after the modification.</returns>
public static Color SetHSV(this in Color color, float? hue = null, float? saturation = null, float? value = null)
public static Color SetHSV(this Color color, float? hue = null, float? saturation = null, float? value = null)
{
(float cHue, float cSaturation, float cValue) = color.GetHSV();
return Create(color.A, hue ?? cHue, saturation ?? cSaturation, value ?? cValue);
Expand Down
Loading
Loading