mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Variable max brightness as some mice do not use 0-100 but 0-4 as brightness values.
This commit is contained in:
@@ -473,6 +473,8 @@ namespace GHelper
|
|||||||
|
|
||||||
if (mouse.HasRGB())
|
if (mouse.HasRGB())
|
||||||
{
|
{
|
||||||
|
sliderBrightness.Max = mouse.MaxBrightness();
|
||||||
|
|
||||||
foreach (LightingMode lm in Enum.GetValues(typeof(LightingMode)))
|
foreach (LightingMode lm in Enum.GetValues(typeof(LightingMode)))
|
||||||
{
|
{
|
||||||
if (mouse.IsLightingModeSupported(lm))
|
if (mouse.IsLightingModeSupported(lm))
|
||||||
|
|||||||
@@ -936,6 +936,11 @@ namespace GHelper.Peripherals.Mouse
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual int MaxBrightness()
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
//Override to remap lighting mode IDs.
|
//Override to remap lighting mode IDs.
|
||||||
//From OpenRGB code it looks like some mice have different orders of the modes or do not support some modes at all.
|
//From OpenRGB code it looks like some mice have different orders of the modes or do not support some modes at all.
|
||||||
protected virtual byte IndexForLightingMode(LightingMode lightingMode)
|
protected virtual byte IndexForLightingMode(LightingMode lightingMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user