mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Changed logitech devices to better fit the sdk-design. This allows to easily plug in new devices as soon as the hid-id is known
This commit is contained in:
1 parent
4f48c63ae2
commit
c3edd506cb
14 files changed
+241
-207
No files matched your search
@@ -49,6 +49,7 @@ namespace RGB.NET.Devices.Logitech.Native
|
||||
_logiLedGetSdkVersionPointer = (LogiLedGetSdkVersionPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedGetSdkVersion"), typeof(LogiLedGetSdkVersionPointer));
|
||||
_lgiLedSaveCurrentLightingPointer = (LogiLedSaveCurrentLightingPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedSaveCurrentLighting"), typeof(LogiLedSaveCurrentLightingPointer));
|
||||
_logiLedRestoreLightingPointer = (LogiLedRestoreLightingPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedRestoreLighting"), typeof(LogiLedRestoreLightingPointer));
|
||||
_logiLedSetLightingPointer = (LogiLedSetLightingPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedSetLighting"), typeof(LogiLedSetLightingPointer));
|
||||
_logiLedSetLightingForKeyWithKeyNamePointer = (LogiLedSetLightingForKeyWithKeyNamePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedSetLightingForKeyWithKeyName"), typeof(LogiLedSetLightingForKeyWithKeyNamePointer));
|
||||
_logiLedSetLightingFromBitmapPointer = (LogiLedSetLightingFromBitmapPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedSetLightingFromBitmap"), typeof(LogiLedSetLightingFromBitmapPointer));
|
||||
}
|
||||
@@ -85,6 +86,7 @@ namespace RGB.NET.Devices.Logitech.Native
|
||||
private static LogiLedGetSdkVersionPointer _logiLedGetSdkVersionPointer;
|
||||
private static LogiLedSaveCurrentLightingPointer _lgiLedSaveCurrentLightingPointer;
|
||||
private static LogiLedRestoreLightingPointer _logiLedRestoreLightingPointer;
|
||||
private static LogiLedSetLightingPointer _logiLedSetLightingPointer;
|
||||
private static LogiLedSetLightingForKeyWithKeyNamePointer _logiLedSetLightingForKeyWithKeyNamePointer;
|
||||
private static LogiLedSetLightingFromBitmapPointer _logiLedSetLightingFromBitmapPointer;
|
||||
|
||||
@@ -110,6 +112,9 @@ namespace RGB.NET.Devices.Logitech.Native
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate bool LogiLedRestoreLightingPointer();
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate bool LogiLedSetLightingPointer(int redPercentage, int greenPercentage, int bluePercentage);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate bool LogiLedSetLightingForKeyWithKeyNamePointer(int keyCode, int redPercentage, int greenPercentage, int bluePercentage);
|
||||
|
||||
@@ -160,6 +165,11 @@ namespace RGB.NET.Devices.Logitech.Native
|
||||
return _logiLedRestoreLightingPointer();
|
||||
}
|
||||
|
||||
internal static bool LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage)
|
||||
{
|
||||
return _logiLedSetLightingPointer(redPercentage, greenPercentage, bluePercentage);
|
||||
}
|
||||
|
||||
internal static bool LogiLedSetLightingForKeyWithKeyName(int keyCode,
|
||||
int redPercentage, int greenPercentage, int bluePercentage)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user