mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Brightness: don't make DDC/CI a slow operation
This commit is contained in:
@@ -108,8 +108,10 @@ const char* ffDetectBrightness(FFlist* result)
|
||||
|
||||
detectWithDisplayServices(displayServer, result);
|
||||
|
||||
if (instance.config.allowSlowOperations && displayServer->displays.length > result->length)
|
||||
#ifdef __aarch64__
|
||||
if (displayServer->displays.length > result->length)
|
||||
detectWithDdcci(result);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -139,12 +139,9 @@ const char* ffDetectBrightness(FFlist* result)
|
||||
detectWithBacklight(result);
|
||||
|
||||
#ifdef FF_HAVE_DDCUTIL
|
||||
if (instance.config.allowSlowOperations)
|
||||
{
|
||||
const FFDisplayServerResult* displayServer = ffConnectDisplayServer();
|
||||
if (result->length < displayServer->displays.length)
|
||||
detectWithDdcci(result);
|
||||
}
|
||||
const FFDisplayServerResult* displayServer = ffConnectDisplayServer();
|
||||
if (result->length < displayServer->displays.length)
|
||||
detectWithDdcci(result);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -76,7 +76,7 @@ const char* ffDetectBrightness(FFlist* result)
|
||||
if (hasBuiltinDisplay(displayServer))
|
||||
detectWithWmi(result);
|
||||
|
||||
if (instance.config.allowSlowOperations && result->length < displayServer->displays.length)
|
||||
if (result->length < displayServer->displays.length)
|
||||
detectWithDdcci(displayServer, result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user