This commit is contained in:
seerge
2023-02-22 19:30:58 +01:00
parent ccf4ae5126
commit 146150b1e7
3 changed files with 4 additions and 11 deletions

View File

@@ -146,7 +146,7 @@ public class ASUSWmi
byte[] args = new byte[8];
BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0);
byte[] status = CallMethod(DSTS, args);
return BitConverter.ToInt32(status, 0)-65536;
return BitConverter.ToInt32(status, 0) - 65536;
}
public byte[] DeviceGetBuffer(uint DeviceID, int Status = 0)

View File

@@ -33,7 +33,6 @@
<ItemGroup>
<PackageReference Include="hidlibrary" Version="3.3.40" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.1" />
<PackageReference Include="TaskScheduler" Version="2.10.1" />
</ItemGroup>

View File

@@ -375,12 +375,6 @@ namespace GHelper
buttonBalanced.FlatAppearance.BorderSize = buttonInactive;
buttonTurbo.FlatAppearance.BorderSize = buttonInactive;
string[] mode = new string[]{
"Balanced",
"Turbo",
"Silent"
};
switch (PerformanceMode)
{
case ASUSWmi.PerformanceSilent:
@@ -398,13 +392,13 @@ namespace GHelper
break;
}
string notifTitle = "Performance Mode Changed";
string notifBody = "Switched to: " + mode[PerformanceMode];
Program.config.setConfig("performance_mode", PerformanceMode);
try
{
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode);
} catch
}
catch
{
labelPerf.Text = "Performance Mode: not supported";
}