1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2026-01-01 18:23:38 +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 name: RGB.NET-CI
on: on:
workflow_dispatch: push:
inputs: branches: [ Development ]
version: paths:
description: 'version' - '**.cs'
required: true - '**.csproj'
type: string - '**.yml'
increment:
required: true
type: string
jobs: jobs:
build: build:
@ -27,10 +24,16 @@ jobs:
8.0.x 8.0.x
7.0.x 7.0.x
6.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 - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - 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 - name: Test
run: dotnet test --no-build --verbosity normal --configuration Release run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6 - name: Upload a Build Artifact NET6

View File

@ -1,12 +1,12 @@
name: RGB.NET-Release name: RGB.NET-Release
on: on:
workflow_dispatch: push:
inputs: branches: [ master ]
version: paths:
description: 'version' - '**.cs'
required: true - '**.csproj'
type: string - '**.yml'
jobs: jobs:
build: build:
@ -23,10 +23,16 @@ jobs:
8.0.x 8.0.x
7.0.x 7.0.x
6.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 - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - 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 - name: Test
run: dotnet test --no-build --verbosity normal --configuration Release run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6 - name: Upload a Build Artifact NET6
@ -56,7 +62,7 @@ jobs:
- name: Release - name: Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
tag_name: v${{ github.event.inputs.version }} tag_name: ${{ steps.versioning.outputs.version_tag }}
generate_release_notes: true generate_release_notes: true
files: bin/net8.0/RGB.NET.*.dll files: bin/net8.0/RGB.NET.*.dll
- name: Nuget Push - name: Nuget Push

View File

@ -47,9 +47,6 @@ internal static unsafe class _CUESDK
#region Properties & Fields #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 bool IsConnected => SesionState == CorsairSessionState.Connected;
internal static CorsairSessionState SesionState { get; private set; } internal static CorsairSessionState SesionState { get; private set; }
@ -61,15 +58,6 @@ internal static unsafe class _CUESDK
#endregion #endregion
#region Constructors
static _CUESDK()
{
SESSION_STATE_CHANGED_CALLBACK = CorsairSessionStateChangedCallback;
}
#endregion
#region Methods #region Methods
private static void CorsairSessionStateChangedCallback(nint context, _CorsairSessionStateChanged eventdata) 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 (_corsairConnectPtr == null) throw new RGBDeviceException("The Corsair-SDK is not initialized.");
if (IsConnected) throw new RGBDeviceException("The Corsair-SDK is already connected."); 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) internal static CorsairError CorsairGetSessionDetails(out _CorsairSessionDetails? details)