mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Only detect temps if --allow-slow-operations is given
This commit is contained in:
@@ -60,9 +60,9 @@ static double getFrequency(const char* info, const char* scaling)
|
||||
return getGHz(scaling);
|
||||
}
|
||||
|
||||
static double detectCPUTemp()
|
||||
static double detectCPUTemp(const FFinstance* instance)
|
||||
{
|
||||
const FFTempsResult* temps = ffDetectTemps();
|
||||
const FFTempsResult* temps = ffDetectTemps(instance);
|
||||
|
||||
for(uint32_t i = 0; i < temps->values.length; i++)
|
||||
{
|
||||
@@ -78,9 +78,10 @@ static double detectCPUTemp()
|
||||
return FF_CPU_TEMP_UNSET;
|
||||
}
|
||||
|
||||
void ffDetectCPUImpl(FFCPUResult* cpu, bool cached)
|
||||
void ffDetectCPUImpl(const FFinstance* instance, FFCPUResult* cpu, bool cached)
|
||||
{
|
||||
cpu->temperature = detectCPUTemp();
|
||||
cpu->temperature = detectCPUTemp(instance);
|
||||
|
||||
if(cached)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user