Added PPT fix for M16, G17 (2023) and F15 (2022)

This commit is contained in:
Serge
2023-06-06 10:59:49 +02:00
parent 678f4b0eb7
commit a3e235e886
4 changed files with 50 additions and 32 deletions

View File

@@ -16,7 +16,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.79</AssemblyVersion>
<AssemblyVersion>0.80</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -1191,6 +1191,13 @@ namespace GHelper
public void AutoPower(int delay = 0)
{
customPower = 0;
bool applyPower = (AppConfig.getConfigPerf("auto_apply_power") == 1);
//bool applyGPU = true;
if (applyPower)
{
// fix for misbehaving bios PPTs on G513
if (AppConfig.ContainsModel("G513") && AppConfig.getConfigPerf("auto_apply") != 1)
{
@@ -1198,12 +1205,16 @@ namespace GHelper
delay = 500;
}
customPower = 0;
// Fix for models that don't support PPT settings in all modes
if (AppConfig.ContainsModel("GU603") || AppConfig.ContainsModel("GU604") || AppConfig.ContainsModel("FX517") || AppConfig.ContainsModel("G733"))
{
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AsusACPI.PerformanceManual, "CustomMode");
if (AppConfig.getConfigPerf("auto_apply") != 1) AutoFans(true);
delay = 500;
}
bool applyPower = AppConfig.getConfigPerf("auto_apply_power") == 1;
bool applyGPU = true;
}
//if (applyPower) Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AsusACPI.PerformanceManual, "CustomMode");
if (delay > 0)
{

View File

@@ -106,7 +106,7 @@ namespace WinFormsSliderBar
private void RecalculateParameters()
{
_radius = 0.4F * ClientSize.Height;
_barSize = new SizeF(ClientSize.Width - 4 * _radius, ClientSize.Height * 0.15F);
_barSize = new SizeF(ClientSize.Width - 2 * _radius, ClientSize.Height * 0.15F);
_barPos = new PointF(_radius, (ClientSize.Height - _barSize.Height) / 2);
_thumbPos = new PointF(
_barSize.Width / (Max - Min) * (Value - Min) + _barPos.X,

View File

@@ -44,8 +44,10 @@ namespace GHelper
}
private Dictionary<string, string> GetDeviceVersions()
{
ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("Select * from Win32_PnPSignedDriver");
ManagementObjectCollection objCollection = objSearcher.Get();
using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("Select * from Win32_PnPSignedDriver"))
{
using (ManagementObjectCollection objCollection = objSearcher.Get())
{
Dictionary<string, string> list = new();
foreach (ManagementObject obj in objCollection)
@@ -56,12 +58,15 @@ namespace GHelper
return list;
}
}
}
private string GetBiosVersion()
{
ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
ManagementObjectCollection objCollection = objSearcher.Get();
using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS"))
{
using (ManagementObjectCollection objCollection = objSearcher.Get())
{
foreach (ManagementObject obj in objCollection)
if (obj["SMBIOSBIOSVersion"] is not null)
{
@@ -73,6 +78,8 @@ namespace GHelper
return "";
}
}
}
public async void DriversAsync(string url, int type, TableLayoutPanel table)
{