From a2d49099e16ef54a409bb7b42061fd16052cbeb6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 5 Mar 2020 14:37:32 +0100 Subject: Add adaptive_sync_status to output IPC reply --- swaymsg/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'swaymsg') diff --git a/swaymsg/main.c b/swaymsg/main.c index b9a8189c..f9d3515a 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -190,7 +190,7 @@ static void pretty_print_output(json_object *o) { json_object_object_get_ex(o, "active", &active); json_object_object_get_ex(o, "current_workspace", &ws); json_object *make, *model, *serial, *scale, *scale_filter, *subpixel, - *transform, *max_render_time; + *transform, *max_render_time, *adaptive_sync_status; json_object_object_get_ex(o, "make", &make); json_object_object_get_ex(o, "model", &model); json_object_object_get_ex(o, "serial", &serial); @@ -199,6 +199,7 @@ static void pretty_print_output(json_object *o) { json_object_object_get_ex(o, "subpixel_hinting", &subpixel); json_object_object_get_ex(o, "transform", &transform); 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 *x, *y; json_object_object_get_ex(rect, "x", &x); json_object_object_get_ex(rect, "y", &y); @@ -219,8 +220,7 @@ static void pretty_print_output(json_object *o) { " Scale filter: %s\n" " Subpixel hinting: %s\n" " Transform: %s\n" - " Workspace: %s\n" - " Max render time: ", + " Workspace: %s\n", json_object_get_string(name), json_object_get_string(make), json_object_get_string(model), @@ -236,8 +236,13 @@ static void pretty_print_output(json_object *o) { json_object_get_string(transform), json_object_get_string(ws) ); + int max_render_time_int = json_object_get_int(max_render_time); + printf(" Max render time: "); printf(max_render_time_int == 0 ? "off\n" : "%d ms\n", max_render_time_int); + + printf(" Adaptive sync: %s\n", + json_object_get_string(adaptive_sync_status)); } else { printf( "Output %s '%s %s %s' (inactive)\n", -- cgit v1.2.3-54-g00ecf