Add support for HDR10 output

This commit is contained in:
Simon Ser 2025-01-27 21:00:54 +01:00
parent c7d7d56f61
commit bac8c0f4d0
11 changed files with 139 additions and 23 deletions

View file

@ -189,7 +189,8 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "current_workspace", &ws);
json_object_object_get_ex(o, "non_desktop", &non_desktop);
json_object *make, *model, *serial, *scale, *scale_filter, *subpixel,
*transform, *max_render_time, *adaptive_sync_status, *allow_tearing;
*transform, *max_render_time, *adaptive_sync_status, *allow_tearing,
*hdr;
json_object_object_get_ex(o, "make", &make);
json_object_object_get_ex(o, "model", &model);
json_object_object_get_ex(o, "serial", &serial);
@ -200,6 +201,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "max_render_time", &max_render_time);
json_object_object_get_ex(o, "adaptive_sync_status", &adaptive_sync_status);
json_object_object_get_ex(o, "allow_tearing", &allow_tearing);
json_object_object_get_ex(o, "hdr", &hdr);
json_object *x, *y;
json_object_object_get_ex(rect, "x", &x);
json_object_object_get_ex(rect, "y", &y);
@ -261,6 +263,7 @@ static void pretty_print_output(json_object *o) {
printf(" Allow tearing: %s\n",
json_object_get_boolean(allow_tearing) ? "yes" : "no");
printf(" HDR: %s\n", json_object_get_boolean(hdr) ? "on" : "off");
} else {
printf(
"Output %s '%s %s %s' (disabled)\n",