summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-06-02 18:12:39 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-06-15 10:09:36 +0000
commitbafead57d0edadf3b0ba7b7f869ccc0b8f084bd0 (patch)
treec262bea9080280f4b2a3c14bad58201fc8b8fea4
parent9f2f83ea833dbc4da0bc026b22873a32e221664c (diff)
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 <marius.vlad@collabora.com> Change-Id: I0842f62487a665d02e0cf9c005755a6260fad180
-rw-r--r--src/main.c15
1 files 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);