From 48b283ab9d4b20f039481ac4aa0496e38dd3b5ef Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 2 Jun 2020 18:12:39 +0300 Subject: main: Retrieve the transform and scale from config file We were missing retrieving the scale and transform for the remote-output. Bug-AGL: SPEC-3280 Signed-off-by: Marius Vlad Change-Id: I0842f62487a665d02e0cf9c005755a6260fad180 --- src/main.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index de2188f..84cb980 100644 --- a/src/main.c +++ b/src/main.c @@ -564,6 +564,9 @@ drm_backend_remoted_output_configure(struct weston_output *output, char *host = NULL; char *pipeline = NULL; int port, ret; + int32_t scale = 1; + uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL; + char *trans; ret = api->set_mode(output, modeline); if (ret < 0) { @@ -573,9 +576,15 @@ drm_backend_remoted_output_configure(struct weston_output *output, return -1; } - /* FIXME: retrieve the scale and the transform from config file */ - weston_output_set_scale(output, 1); - weston_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL); + weston_config_section_get_int(section, "scale", &scale, 1); + weston_output_set_scale(output, scale); + + weston_config_section_get_string(section, "transform", &trans, "normal"); + if (parse_transform(trans, &transform) < 0) { + weston_log("Invalid transform \"%s\" for output %s\n", + trans, output->name); + } + weston_output_set_transform(output, transform); weston_config_section_get_string(section, "gbm-format", &gbm_format, NULL); -- cgit 1.2.3-korg