X13 tweaks

This commit is contained in:
Serge
2023-06-29 18:18:42 +02:00
parent 8a3708e850
commit 3fb61d3bf1
5 changed files with 12 additions and 13 deletions

View File

@@ -118,7 +118,7 @@ namespace GHelper
_modes.Remove(3); _modes.Remove(3);
} }
if (AppConfig.ContainsModel("401")) if (AppConfig.ContainsModel("401") || AppConfig.ContainsModel("X13"))
{ {
_modes.Remove(2); _modes.Remove(2);
_modes.Remove(3); _modes.Remove(3);
@@ -150,6 +150,11 @@ namespace GHelper
} }
} }
public static bool HasColor()
{
return AppConfig.ContainsModel("GA401") || AppConfig.ContainsModel("X13");
}
public static bool HasSecondColor() public static bool HasSecondColor()
{ {
return (mode == 1 && !AppConfig.ContainsModel("TUF")); return (mode == 1 && !AppConfig.ContainsModel("TUF"));

View File

@@ -24,7 +24,7 @@ public static class HardwareControl
{ {
int max = 58; int max = 58;
int configMax = AppConfig.Get("fan_max"); int configMax = AppConfig.Get("fan_max");
if (configMax > 100) configMax = 0; // skipping inadvequate settings if (configMax > 80) configMax = 0; // skipping inadvequate settings
if (AppConfig.ContainsModel("401")) max = 72; if (AppConfig.ContainsModel("401")) max = 72;
else if (AppConfig.ContainsModel("503")) max = 68; else if (AppConfig.ContainsModel("503")) max = 68;
@@ -45,7 +45,7 @@ public static class HardwareControl
} }
int fanMax = GetFanMax(); int fanMax = GetFanMax();
if (fan > fanMax && fan < 110) SetFanMax(fan); if (fan > fanMax && fan < 80) SetFanMax(fan);
if (AppConfig.Is("fan_rpm")) if (AppConfig.Is("fan_rpm"))
return GHelper.Properties.Strings.FanSpeed + (fan * 100).ToString() + "RPM"; return GHelper.Properties.Strings.FanSpeed + (fan * 100).ToString() + "RPM";
@@ -192,14 +192,6 @@ public static class HardwareControl
{ {
List<string> tokill = new() { "EADesktop", "RadeonSoftware", "epicgameslauncher", "ASUSSmartDisplayControl" }; List<string> tokill = new() { "EADesktop", "RadeonSoftware", "epicgameslauncher", "ASUSSmartDisplayControl" };
if (AppConfig.Is("kill_gpu_apps"))
{
tokill.Add("nvdisplay.container");
tokill.Add("nvcontainer");
tokill.Add("nvcplui");
}
foreach (string kill in tokill) ProcessHelper.KillByName(kill); foreach (string kill in tokill) ProcessHelper.KillByName(kill);
if (AppConfig.Is("kill_gpu_apps") && GpuControl is not null) if (AppConfig.Is("kill_gpu_apps") && GpuControl is not null)

View File

@@ -402,9 +402,11 @@ namespace GHelper.Input
switch (EventID) switch (EventID)
{ {
case 16: // FN+F7 case 16: // FN+F7
//ScreenBrightness.Adjust(-10);
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Down, "Brightness"); Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Down, "Brightness");
break; break;
case 32: // FN+F8 case 32: // FN+F8
//ScreenBrightness.Adjust(+10);
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness"); Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
break; break;
case 107: // FN+F10 case 107: // FN+F10

View File

@@ -19,7 +19,7 @@ namespace GHelper.Mode
public ModeControl() public ModeControl()
{ {
reapplyTimer = new System.Timers.Timer(30 * 1000); reapplyTimer = new System.Timers.Timer(AppConfig.GetMode("reapply_time", 30) * 1000);
reapplyTimer.Elapsed += ReapplyTimer_Elapsed; reapplyTimer.Elapsed += ReapplyTimer_Elapsed;
reapplyTimer.Enabled = false; reapplyTimer.Enabled = false;
} }

View File

@@ -712,7 +712,7 @@ namespace GHelper
pictureColor2.BackColor = AsusUSB.Color2; pictureColor2.BackColor = AsusUSB.Color2;
pictureColor2.Visible = AsusUSB.HasSecondColor(); pictureColor2.Visible = AsusUSB.HasSecondColor();
if (AppConfig.ContainsModel("GA401")) if (AsusUSB.HasColor())
{ {
panelColor.Visible = false; panelColor.Visible = false;
} }