mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Support for proper "Off" Lighting mode
This commit is contained in:
@@ -15,6 +15,7 @@ namespace GHelper
|
|||||||
{ LightingMode.React, Properties.Strings.AuraReact},
|
{ LightingMode.React, Properties.Strings.AuraReact},
|
||||||
{ LightingMode.Comet, Properties.Strings.AuraComet},
|
{ LightingMode.Comet, Properties.Strings.AuraComet},
|
||||||
{ LightingMode.BatteryState, Properties.Strings.AuraBatteryState},
|
{ LightingMode.BatteryState, Properties.Strings.AuraBatteryState},
|
||||||
|
{ LightingMode.Off, Properties.Strings.MatrixOff},
|
||||||
};
|
};
|
||||||
private List<LightingMode> supportedLightingModes = new List<LightingMode>();
|
private List<LightingMode> supportedLightingModes = new List<LightingMode>();
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace GHelper.Peripherals.Mouse
|
|||||||
}
|
}
|
||||||
public enum LightingMode
|
public enum LightingMode
|
||||||
{
|
{
|
||||||
|
Off = 0xF0,
|
||||||
Static = 0x0,
|
Static = 0x0,
|
||||||
Breathing = 0x1,
|
Breathing = 0x1,
|
||||||
ColorCycle = 0x2,
|
ColorCycle = 0x2,
|
||||||
@@ -873,6 +874,11 @@ namespace GHelper.Peripherals.Mouse
|
|||||||
//Also override this for the reverse mapping
|
//Also override this for the reverse mapping
|
||||||
protected virtual LightingMode LightingModeForIndex(byte lightingMode)
|
protected virtual LightingMode LightingModeForIndex(byte lightingMode)
|
||||||
{
|
{
|
||||||
|
//We do not support other mods. we treat them as off. True off is actually 0xF0.
|
||||||
|
if (lightingMode > 0x06)
|
||||||
|
{
|
||||||
|
return LightingMode.Off;
|
||||||
|
}
|
||||||
return ((LightingMode)lightingMode);
|
return ((LightingMode)lightingMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user