mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
TUF brightness fix https://github.com/seerge/g-helper/issues/990
This commit is contained in:
@@ -155,17 +155,13 @@ namespace GHelper.Input
|
|||||||
int brightness = -1;
|
int brightness = -1;
|
||||||
|
|
||||||
if (isTUF) brightness = ScreenBrightness.Get();
|
if (isTUF) brightness = ScreenBrightness.Get();
|
||||||
|
if (AppConfig.SwappedBrightness()) delta = -delta;
|
||||||
|
|
||||||
if (AppConfig.SwappedBrightness())
|
Program.acpi.DeviceSet(AsusACPI.UniversalControl, delta > 0 ? AsusACPI.Brightness_Up : AsusACPI.Brightness_Down, "Brightness");
|
||||||
{
|
|
||||||
HandleOptimizationEvent(delta > 0 ? 32 : 16);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
HandleOptimizationEvent(delta > 0 ? 16 : 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isTUF)
|
if (isTUF)
|
||||||
{
|
{
|
||||||
|
if (AppConfig.SwappedBrightness()) return;
|
||||||
if (delta < 0 && brightness <= 0) return;
|
if (delta < 0 && brightness <= 0) return;
|
||||||
if (delta > 0 && brightness >= 100) return;
|
if (delta > 0 && brightness >= 100) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user