DisplayServer: support brightness detection (macOS)

This commit is contained in:
李通洲
2023-01-07 19:46:56 +08:00
parent 3e2c344417
commit 959540f17c
9 changed files with 40 additions and 15 deletions
+5 -1
View File
@@ -27,6 +27,9 @@ void ffPrintResolution(FFinstance* instance)
if(result->refreshRate > 0)
printf(" @ %iHz", result->refreshRate);
if(result->brightness >= 0)
printf(" (☀️ %d%%)", result->brightness);
putchar('\n');
}
else
@@ -34,7 +37,8 @@ void ffPrintResolution(FFinstance* instance)
ffPrintFormat(instance, FF_RESOLUTION_MODULE_NAME, moduleIndex, &instance->config.resolution, FF_RESOLUTION_NUM_FORMAT_ARGS, (FFformatarg[]) {
{FF_FORMAT_ARG_TYPE_INT, &result->width},
{FF_FORMAT_ARG_TYPE_INT, &result->height},
{FF_FORMAT_ARG_TYPE_INT, &result->refreshRate}
{FF_FORMAT_ARG_TYPE_INT, &result->refreshRate},
{FF_FORMAT_ARG_TYPE_INT, &result->brightness},
});
}
}