mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Backlight init delay
This commit is contained in:
@@ -333,13 +333,15 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void ApplyBrightness(int brightness, string log = "Backlight")
|
public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
if (isTuf) Program.acpi.TUFKeyboardBrightness(brightness);
|
if (isTuf) Program.acpi.TUFKeyboardBrightness(brightness);
|
||||||
|
|
||||||
byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
||||||
|
|||||||
@@ -599,9 +599,7 @@ namespace GHelper.Input
|
|||||||
public static void SetBacklightAuto(bool init = false)
|
public static void SetBacklightAuto(bool init = false)
|
||||||
{
|
{
|
||||||
if (init) AsusUSB.Init();
|
if (init) AsusUSB.Init();
|
||||||
|
AsusUSB.ApplyBrightness(GetBacklight(), "Auto", init);
|
||||||
//if (!OptimizationService.IsRunning())
|
|
||||||
AsusUSB.ApplyBrightness(GetBacklight(), "Auto");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetBacklight(int delta, bool force = false)
|
public static void SetBacklight(int delta, bool force = false)
|
||||||
|
|||||||
Reference in New Issue
Block a user