mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Add features.hdr to output IPC response
This commit is contained in:
parent
6fed1f9d89
commit
94c819cc1f
4 changed files with 33 additions and 19 deletions
|
|
@ -212,9 +212,10 @@ static void pretty_print_output(json_object *o) {
|
|||
json_object_object_get_ex(current_mode, "width", &width);
|
||||
json_object_object_get_ex(current_mode, "height", &height);
|
||||
json_object_object_get_ex(current_mode, "refresh", &refresh);
|
||||
json_object *features, *features_adaptive_sync;
|
||||
json_object *features, *features_adaptive_sync, *features_hdr;
|
||||
json_object_object_get_ex(o, "features", &features);
|
||||
json_object_object_get_ex(features, "adaptive_sync", &features_adaptive_sync);
|
||||
json_object_object_get_ex(features, "hdr", &features_hdr);
|
||||
|
||||
if (json_object_get_boolean(non_desktop)) {
|
||||
printf(
|
||||
|
|
@ -263,7 +264,12 @@ 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");
|
||||
|
||||
const char *hdr_str = "unsupported";
|
||||
if (json_object_get_boolean(features_hdr)) {
|
||||
hdr_str = json_object_get_boolean(hdr) ? "on" : "off";
|
||||
}
|
||||
printf(" HDR: %s\n", hdr_str);
|
||||
} else {
|
||||
printf(
|
||||
"Output %s '%s %s %s' (disabled)\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue