1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 10:08:31 +00:00

Compare commits

..

No commits in common. "1b9531a86f34ea334fcf0f52aa9501cb260245b8" and "c0adbad5999d104b731a0ac28c548a171325a66a" have entirely different histories.

3 changed files with 28 additions and 31 deletions

View File

@ -1,15 +1,12 @@
name: RGB.NET-CI
on:
workflow_dispatch:
inputs:
version:
description: 'version'
required: true
type: string
increment:
required: true
type: string
push:
branches: [ Development ]
paths:
- '**.cs'
- '**.csproj'
- '**.yml'
jobs:
build:
@ -27,10 +24,16 @@ jobs:
8.0.x
7.0.x
6.0.x
- name: Git Semantic Version
id: versioning
uses: PaulHatch/semantic-version@v4.0.3
with:
short_tags: false
format: "${major}.${minor}.${patch}-prerelease.${increment}"
- 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 }}
run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6

View File

@ -1,12 +1,12 @@
name: RGB.NET-Release
on:
workflow_dispatch:
inputs:
version:
description: 'version'
required: true
type: string
push:
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- '**.yml'
jobs:
build:
@ -23,10 +23,16 @@ jobs:
8.0.x
7.0.x
6.0.x
- name: Git Semantic Version
id: versioning
uses: PaulHatch/semantic-version@v4.0.3
with:
short_tags: false
format: "${major}.${minor}.${patch}"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }}
run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6
@ -56,7 +62,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.version }}
tag_name: ${{ steps.versioning.outputs.version_tag }}
generate_release_notes: true
files: bin/net8.0/RGB.NET.*.dll
- name: Nuget Push

View File

@ -47,9 +47,6 @@ internal static unsafe class _CUESDK
#region Properties & Fields
// ReSharper disable once NotAccessedField.Local - This is important, the delegate can be collected if it's not stored!
private static readonly CorsairSessionStateChangedHandler SESSION_STATE_CHANGED_CALLBACK;
internal static bool IsConnected => SesionState == CorsairSessionState.Connected;
internal static CorsairSessionState SesionState { get; private set; }
@ -61,15 +58,6 @@ internal static unsafe class _CUESDK
#endregion
#region Constructors
static _CUESDK()
{
SESSION_STATE_CHANGED_CALLBACK = CorsairSessionStateChangedCallback;
}
#endregion
#region Methods
private static void CorsairSessionStateChangedCallback(nint context, _CorsairSessionStateChanged eventdata)
@ -186,7 +174,7 @@ internal static unsafe class _CUESDK
{
if (_corsairConnectPtr == null) throw new RGBDeviceException("The Corsair-SDK is not initialized.");
if (IsConnected) throw new RGBDeviceException("The Corsair-SDK is already connected.");
return _corsairConnectPtr(SESSION_STATE_CHANGED_CALLBACK, 0);
return _corsairConnectPtr(CorsairSessionStateChangedCallback, 0);
}
internal static CorsairError CorsairGetSessionDetails(out _CorsairSessionDetails? details)