mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Miniled / Multizone Toggle for 2024 models https://github.com/seerge/g-helper/issues/1957
This commit is contained in:
@@ -72,8 +72,10 @@ public class AsusACPI
|
|||||||
public const uint GPUMuxVivo = 0x00090026;
|
public const uint GPUMuxVivo = 0x00090026;
|
||||||
|
|
||||||
public const uint BatteryLimit = 0x00120057;
|
public const uint BatteryLimit = 0x00120057;
|
||||||
|
|
||||||
public const uint ScreenOverdrive = 0x00050019;
|
public const uint ScreenOverdrive = 0x00050019;
|
||||||
public const uint ScreenMiniled = 0x0005001E;
|
public const uint ScreenMiniled1 = 0x0005001E;
|
||||||
|
public const uint ScreenMiniled2 = 0x0005002E;
|
||||||
|
|
||||||
public const uint DevsCPUFan = 0x00110022;
|
public const uint DevsCPUFan = 0x00110022;
|
||||||
public const uint DevsGPUFan = 0x00110023;
|
public const uint DevsGPUFan = 0x00110023;
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ namespace GHelper.Display
|
|||||||
|
|
||||||
if (miniled >= 0)
|
if (miniled >= 0)
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.ScreenMiniled, miniled, "Miniled");
|
if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0)
|
||||||
Debug.WriteLine("Miniled " + miniled);
|
Program.acpi.DeviceSet(AsusACPI.ScreenMiniled1, miniled, "Miniled1");
|
||||||
|
else
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.ScreenMiniled2, miniled, "Miniled2");
|
||||||
}
|
}
|
||||||
|
|
||||||
InitScreen();
|
InitScreen();
|
||||||
@@ -59,7 +61,26 @@ namespace GHelper.Display
|
|||||||
|
|
||||||
public int ToogleMiniled()
|
public int ToogleMiniled()
|
||||||
{
|
{
|
||||||
int miniled = (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled) == 1) ? 0 : 1;
|
int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1);
|
||||||
|
int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2);
|
||||||
|
|
||||||
|
Logger.WriteLine($"MiniledToggle: {miniled1} {miniled2}");
|
||||||
|
|
||||||
|
int miniled;
|
||||||
|
|
||||||
|
if (miniled1 >= 0)
|
||||||
|
{
|
||||||
|
miniled = (miniled1 == 1) ? 0 : 1;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
switch (miniled2)
|
||||||
|
{
|
||||||
|
case 1: miniled = 2; break;
|
||||||
|
case 2: miniled = 0; break;
|
||||||
|
default: miniled = 1; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AppConfig.Set("miniled", miniled);
|
AppConfig.Set("miniled", miniled);
|
||||||
SetScreen(-1, -1, miniled);
|
SetScreen(-1, -1, miniled);
|
||||||
return miniled;
|
return miniled;
|
||||||
@@ -76,7 +97,13 @@ namespace GHelper.Display
|
|||||||
bool overdriveSetting = !AppConfig.Is("no_overdrive");
|
bool overdriveSetting = !AppConfig.Is("no_overdrive");
|
||||||
|
|
||||||
int overdrive = Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive);
|
int overdrive = Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive);
|
||||||
int miniled = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled);
|
|
||||||
|
int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1);
|
||||||
|
int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2);
|
||||||
|
|
||||||
|
Logger.WriteLine($"Miniled: {miniled1} {miniled2}");
|
||||||
|
|
||||||
|
int miniled = (miniled1 >= 0) ? miniled1 : miniled2;
|
||||||
|
|
||||||
bool hdr = false;
|
bool hdr = false;
|
||||||
|
|
||||||
|
|||||||
@@ -970,7 +970,17 @@ namespace GHelper
|
|||||||
|
|
||||||
if (miniled >= 0)
|
if (miniled >= 0)
|
||||||
{
|
{
|
||||||
buttonMiniled.Activated = (miniled == 1) || hdr;
|
if (miniled == 2)
|
||||||
|
{
|
||||||
|
buttonMiniled.Text = Properties.Strings.Multizone + " Strong";
|
||||||
|
buttonMiniled.BorderColor = colorStandard;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
buttonMiniled.Text = Properties.Strings.Multizone;
|
||||||
|
buttonMiniled.BorderColor = colorTurbo;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonMiniled.Activated = (miniled > 0) || hdr;
|
||||||
buttonMiniled.Enabled = !hdr;
|
buttonMiniled.Enabled = !hdr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user