mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Skip auto-backlight when lid is closed https://github.com/seerge/g-helper/issues/3335
This commit is contained in:
@@ -14,6 +14,7 @@ namespace GHelper.Input
|
|||||||
{
|
{
|
||||||
System.Timers.Timer timer = new System.Timers.Timer(1000);
|
System.Timers.Timer timer = new System.Timers.Timer(1000);
|
||||||
public static bool backlightActivity = true;
|
public static bool backlightActivity = true;
|
||||||
|
public static bool lidClose = false;
|
||||||
|
|
||||||
public static Keys keyProfile = (Keys)AppConfig.Get("keybind_profile", (int)Keys.F5);
|
public static Keys keyProfile = (Keys)AppConfig.Get("keybind_profile", (int)Keys.F5);
|
||||||
public static Keys keyApp = (Keys)AppConfig.Get("keybind_app", (int)Keys.F12);
|
public static Keys keyApp = (Keys)AppConfig.Get("keybind_app", (int)Keys.F12);
|
||||||
@@ -874,6 +875,7 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
public static void SetBacklightAuto(bool init = false)
|
public static void SetBacklightAuto(bool init = false)
|
||||||
{
|
{
|
||||||
|
if (lidClose) return;
|
||||||
if (init) Aura.Init();
|
if (init) Aura.Init();
|
||||||
Aura.ApplyBrightness(GetBacklight(), "Auto", init);
|
Aura.ApplyBrightness(GetBacklight(), "Auto", init);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -674,14 +674,14 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
Logger.WriteLine("Lid Closed");
|
Logger.WriteLine("Lid Closed");
|
||||||
|
InputDispatcher.lidClose = AniMatrixControl.lidClose = true;
|
||||||
Aura.ApplyBrightness(0, "Lid");
|
Aura.ApplyBrightness(0, "Lid");
|
||||||
AniMatrixControl.lidClose = true;
|
|
||||||
matrixControl.SetLidMode();
|
matrixControl.SetLidMode();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Logger.WriteLine("Lid Open");
|
Logger.WriteLine("Lid Open");
|
||||||
|
InputDispatcher.lidClose = AniMatrixControl.lidClose = false;
|
||||||
Aura.ApplyBrightness(InputDispatcher.GetBacklight(), "Lid");
|
Aura.ApplyBrightness(InputDispatcher.GetBacklight(), "Lid");
|
||||||
AniMatrixControl.lidClose = false;
|
|
||||||
matrixControl.SetLidMode();
|
matrixControl.SetLidMode();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user