Only detect temps if --allow-slow-operations is given

This commit is contained in:
Linus Dierheimer
2022-09-24 15:59:36 +02:00
parent 0250d11d97
commit f5ac85c4e3
7 changed files with 36 additions and 50 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
#define FF_CPU_CACHE_NAME "cpu"
void ffDetectCPUImpl(FFCPUResult* cpu, bool cached);
void ffDetectCPUImpl(const FFinstance* instance, FFCPUResult* cpu, bool cached);
static bool cacheCallback(FFCPUResult* cpu, FFCache* cache, FFCacheMethodStrbuf strbufMethod, FFCacheMethodData dataMethod)
{
@@ -25,7 +25,7 @@ static void detectCPU(const FFinstance* instance, FFCPUResult* cpu)
bool cached = ffCacheRead(instance, cpu, FF_CPU_CACHE_NAME, (FFCacheMethodCallback) cacheCallback);
ffDetectCPUImpl(cpu, cached);
ffDetectCPUImpl(instance, cpu, cached);
if(cached)
return;