mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Fixed use before initialize
This commit is contained in:
1 parent
1eba5c66be
commit
072f0c24ed
7 files changed
+24
-17
No files matched your search
@@ -140,8 +140,6 @@ namespace CUE.NET.Devices.Generic
|
||||
{
|
||||
this.DeviceInfo = info;
|
||||
|
||||
// ReSharper disable once VirtualMemberCallInConstructor - I know, but I need this ...
|
||||
InitializeLeds();
|
||||
DeviceRectangle = RectangleHelper.CreateRectangleFromRectangles((this).Select(x => x.LedRectangle));
|
||||
}
|
||||
|
||||
@@ -152,9 +150,9 @@ namespace CUE.NET.Devices.Generic
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LEDs of the device.
|
||||
/// Initializes the device.
|
||||
/// </summary>
|
||||
protected abstract void InitializeLeds();
|
||||
public abstract void Initialize();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LED-Object with the specified id.
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace CUE.NET.Devices.Headset
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LEDs of the device.
|
||||
/// Initializes the the headset.
|
||||
/// </summary>
|
||||
protected override void InitializeLeds()
|
||||
public override void Initialize()
|
||||
{
|
||||
InitializeLed(CorsairHeadsetLedId.LeftLogo, new RectangleF(0, 0, 1, 1));
|
||||
InitializeLed(CorsairHeadsetLedId.RightLogo, new RectangleF(1, 0, 1, 1));
|
||||
|
||||
@@ -11,7 +11,7 @@ using CUE.NET.Groups;
|
||||
namespace CUE.NET.Devices
|
||||
{
|
||||
#region EventHandler
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents the event-handler of the Exception-event.
|
||||
/// </summary>
|
||||
@@ -134,6 +134,11 @@ namespace CUE.NET.Devices
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the device.
|
||||
/// </summary>
|
||||
void Initialize();
|
||||
|
||||
/// <summary>
|
||||
/// Perform an update for all dirty keys, or all keys if flushLeds is set to true.
|
||||
/// </summary>
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace CUE.NET.Devices.Keyboard
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LEDs of the device.
|
||||
/// Initializes the keyboard.
|
||||
/// </summary>
|
||||
protected override void InitializeLeds()
|
||||
public override void Initialize()
|
||||
{
|
||||
_CorsairLedPositions nativeLedPositions = (_CorsairLedPositions)Marshal.PtrToStructure(_CUESDK.CorsairGetLedPositions(), typeof(_CorsairLedPositions));
|
||||
int structSize = Marshal.SizeOf(typeof(_CorsairLedPosition));
|
||||
|
||||
@@ -40,9 +40,9 @@ namespace CUE.NET.Devices.Mouse
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LEDs of the device.
|
||||
/// Initializes the mouse.
|
||||
/// </summary>
|
||||
protected override void InitializeLeds()
|
||||
public override void Initialize()
|
||||
{
|
||||
switch (MouseDeviceInfo.PhysicalLayout)
|
||||
{
|
||||
|
||||
@@ -45,9 +45,9 @@ namespace CUE.NET.Devices.Mousemat
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the LEDs of the device.
|
||||
/// Initializes the mousemat.
|
||||
/// </summary>
|
||||
protected override void InitializeLeds()
|
||||
public override void Initialize()
|
||||
{
|
||||
int deviceCount = _CUESDK.CorsairGetDeviceCount();
|
||||
|
||||
|
||||
Reference in new issue
Block a user