mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Check limiters for their availability before using them
This commit is contained in:
@@ -157,13 +157,13 @@ namespace GHelper.AutoTDP
|
||||
{
|
||||
string? limiter = AppConfig.GetString("auto_tdp_limiter");
|
||||
|
||||
if (limiter is null || limiter.Equals("asus_acpi"))
|
||||
if (limiter is null || limiter.Equals("asus_acpi") && ASUSACPIPowerLimiter.IsAvailable())
|
||||
{
|
||||
powerLimiter = new ASUSACPIPowerLimiter();
|
||||
return;
|
||||
}
|
||||
|
||||
if (limiter is not null && limiter.Equals("intel_msr"))
|
||||
if (limiter is not null && limiter.Equals("intel_msr") && IntelMSRPowerLimiter.IsAvailable())
|
||||
{
|
||||
powerLimiter = new IntelMSRPowerLimiter();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user