Skip to content

Commit 292fa06

Browse files
zhon12345CarterLi
andauthored
Display: capitalize {type}'s output (#1543)
* Display: capitalize {type}'s output * Update display.c * Update json_schema.json --------- Co-authored-by: Carter Li <[email protected]>
1 parent f2755a8 commit 292fa06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/json_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
"type": "string"
180180
},
181181
"displayFormat": {
182-
"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)",
182+
"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)",
183183
"type": "string"
184184
},
185185
"diskFormat": {

src/modules/display/display.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void ffPrintDisplay(FFDisplayOptions* options)
7575
{
7676
FFDisplayResult* result = FF_LIST_GET(FFDisplayResult, dsResult->displays, i);
7777
uint32_t moduleIndex = dsResult->displays.length == 1 ? 0 : i + 1;
78-
const char* displayType = result->type == FF_DISPLAY_TYPE_UNKNOWN ? NULL : result->type == FF_DISPLAY_TYPE_BUILTIN ? "built-in" : "external";
78+
const char* displayType = result->type == FF_DISPLAY_TYPE_UNKNOWN ? NULL : result->type == FF_DISPLAY_TYPE_BUILTIN ? "Built-in" : "External";
7979

8080
ffStrbufClear(&key);
8181
if(options->moduleArgs.key.length == 0)
@@ -448,7 +448,7 @@ static FFModuleBaseInfo ffModuleInfo = {
448448
{"Screen scaled width (in pixels)", "scaled-width"},
449449
{"Screen scaled height (in pixels)", "scaled-height"},
450450
{"Screen name", "name"},
451-
{"Screen type (builtin, external or unknown)", "type"},
451+
{"Screen type (Built-in or External)", "type"},
452452
{"Screen rotation (in degrees)", "rotation"},
453453
{"True if being the primary screen", "is-primary"},
454454
{"Screen physical width (in millimeters)", "physical-width"},

0 commit comments

Comments
 (0)