mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Force miniled status on start / display toggle for G843JYR https://github.com/seerge/g-helper/issues/2802
This commit is contained in:
@@ -657,4 +657,9 @@ public static class AppConfig
|
|||||||
return IsSlash() || ContainsModel("JIR") || ContainsModel("JZR") || ContainsModel("JVR") || ContainsModel("JYR") || ContainsModel("FA607P") || ContainsModel("FX607J") || ContainsModel("FA507U");
|
return IsSlash() || ContainsModel("JIR") || ContainsModel("JZR") || ContainsModel("JVR") || ContainsModel("JYR") || ContainsModel("FA607P") || ContainsModel("FX607J") || ContainsModel("FA507U");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsForceMiniled()
|
||||||
|
{
|
||||||
|
return ContainsModel("G843JYR") || Is("force_miniled");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ namespace GHelper.Display
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetMiniled(miniled);
|
||||||
|
|
||||||
|
InitScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMiniled(int miniled = -1)
|
||||||
|
{
|
||||||
if (miniled >= 0)
|
if (miniled >= 0)
|
||||||
{
|
{
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0)
|
if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0)
|
||||||
@@ -70,8 +77,12 @@ namespace GHelper.Display
|
|||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InitScreen();
|
public void InitMiniled()
|
||||||
|
{
|
||||||
|
if (AppConfig.IsForceMiniled())
|
||||||
|
SetMiniled(AppConfig.Get("miniled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToogleFHD()
|
public void ToogleFHD()
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ namespace GHelper.Helpers
|
|||||||
if (Program.settingsForm.Visible)
|
if (Program.settingsForm.Visible)
|
||||||
Program.screenControl.InitScreen();
|
Program.screenControl.InitScreen();
|
||||||
|
|
||||||
|
if (AppConfig.IsForceMiniled())
|
||||||
|
Program.screenControl.InitMiniled();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int CheckAndSaveLidAction()
|
private static int CheckAndSaveLidAction()
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ namespace GHelper
|
|||||||
Logger.WriteLine("AutoSetting for " + isPlugged.ToString());
|
Logger.WriteLine("AutoSetting for " + isPlugged.ToString());
|
||||||
|
|
||||||
BatteryControl.AutoBattery(init);
|
BatteryControl.AutoBattery(init);
|
||||||
|
if (init) screenControl.InitMiniled();
|
||||||
|
|
||||||
inputDispatcher.Init();
|
inputDispatcher.Init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user