Display: capitalize {type}'s output (#1543)
Some checks are pending
CI / spellcheck (push) Waiting to run
CI / No-features-test (push) Waiting to run
CI / Linux-amd64 (push) Waiting to run
CI / Linux-aarch64 (push) Waiting to run
CI / Linux-armv7 (push) Waiting to run
CI / Linux-armv6 (push) Waiting to run
CI / Linux-riscv64 (push) Waiting to run
CI / Linux-ppc64le (push) Waiting to run
CI / Musl-amd64 (push) Waiting to run
CI / macOS-universal (push) Waiting to run
CI / SunOS-amd64 (push) Waiting to run
CI / FreeBSD-amd64 (push) Waiting to run
CI / DragonFly-amd64 (push) Waiting to run
CI / OpenBSD-amd64 (push) Waiting to run
CI / NetBSD-amd64 (push) Waiting to run
CI / Windows-amd64 (push) Waiting to run
CI / Release (push) Blocked by required conditions

* Display: capitalize {type}'s output

* Update display.c

* Update json_schema.json

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
Ng Zhun Onn 2025-02-07 21:48:31 +08:00 committed by GitHub
parent f2755a844b
commit 292fa0686f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@
"type": "string"
},
"displayFormat": {
"description": "Output format of the module `Display`. See `-h format` for formatting syntax\n 1. {width}: Screen configured width (in pixels)\n 2. {height}: Screen configured height (in pixels)\n 3. {refresh-rate}: Screen configured refresh rate (in Hz)\n 4. {scaled-width}: Screen scaled width (in pixels)\n 5. {scaled-height}: Screen scaled height (in pixels)\n 6. {name}: Screen name\n 7. {type}: Screen type (builtin, external or unknown)\n 8. {rotation}: Screen rotation (in degrees)\n 9. {is-primary}: True if being the primary screen\n 10. {physical-width}: Screen physical width (in millimeters)\n 11. {physical-height}: Screen physical height (in millimeters)\n 12. {inch}: Physical diagonal length in inches\n 13. {ppi}: Pixels per inch (PPI)\n 14. {bit-depth}: Bits per color channel\n 15. {hdr-enabled}: True if high dynamic range (HDR) mode is enabled\n 16. {manufacture-year}: Year of manufacturing\n 17. {manufacture-week}: Nth week of manufacturing in the year\n 18. {serial}: Serial number\n 19. {platform-api}: The platform API used when detecting the display\n 20. {hdr-compatible}: True if the display is HDR compatible\n 21. {scale-factor}: HiDPI scale factor\n 22. {preferred-width}: Screen preferred width (in pixels)\n 23. {preferred-height}: Screen preferred height (in pixels)\n 24. {preferred-refresh-rate}: Screen preferred refresh rate (in Hz)",
"description": "Output format of the module `Display`. See `-h format` for formatting syntax\n 1. {width}: Screen configured width (in pixels)\n 2. {height}: Screen configured height (in pixels)\n 3. {refresh-rate}: Screen configured refresh rate (in Hz)\n 4. {scaled-width}: Screen scaled width (in pixels)\n 5. {scaled-height}: Screen scaled height (in pixels)\n 6. {name}: Screen name\n 7. {type}: Screen type (Built-in or External)\n 8. {rotation}: Screen rotation (in degrees)\n 9. {is-primary}: True if being the primary screen\n 10. {physical-width}: Screen physical width (in millimeters)\n 11. {physical-height}: Screen physical height (in millimeters)\n 12. {inch}: Physical diagonal length in inches\n 13. {ppi}: Pixels per inch (PPI)\n 14. {bit-depth}: Bits per color channel\n 15. {hdr-enabled}: True if high dynamic range (HDR) mode is enabled\n 16. {manufacture-year}: Year of manufacturing\n 17. {manufacture-week}: Nth week of manufacturing in the year\n 18. {serial}: Serial number\n 19. {platform-api}: The platform API used when detecting the display\n 20. {hdr-compatible}: True if the display is HDR compatible\n 21. {scale-factor}: HiDPI scale factor\n 22. {preferred-width}: Screen preferred width (in pixels)\n 23. {preferred-height}: Screen preferred height (in pixels)\n 24. {preferred-refresh-rate}: Screen preferred refresh rate (in Hz)",
"type": "string"
},
"diskFormat": {

View File

@ -75,7 +75,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
{
FFDisplayResult* result = FF_LIST_GET(FFDisplayResult, dsResult->displays, i);
uint32_t moduleIndex = dsResult->displays.length == 1 ? 0 : i + 1;
const char* displayType = result->type == FF_DISPLAY_TYPE_UNKNOWN ? NULL : result->type == FF_DISPLAY_TYPE_BUILTIN ? "built-in" : "external";
const char* displayType = result->type == FF_DISPLAY_TYPE_UNKNOWN ? NULL : result->type == FF_DISPLAY_TYPE_BUILTIN ? "Built-in" : "External";
ffStrbufClear(&key);
if(options->moduleArgs.key.length == 0)
@ -448,7 +448,7 @@ static FFModuleBaseInfo ffModuleInfo = {
{"Screen scaled width (in pixels)", "scaled-width"},
{"Screen scaled height (in pixels)", "scaled-height"},
{"Screen name", "name"},
{"Screen type (builtin, external or unknown)", "type"},
{"Screen type (Built-in or External)", "type"},
{"Screen rotation (in degrees)", "rotation"},
{"True if being the primary screen", "is-primary"},
{"Screen physical width (in millimeters)", "physical-width"},