summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-11-30 17:53:13 +0200
committerMarius Vlad <marius.vlad@collabora.com>2020-11-30 18:09:46 +0200
commitf31d102b1a1f6ef5864916d102ec1ae2dc9d0988 (patch)
tree9bd0d016d4153c6f0b1ea1a2b57f4274b389e378
parentc9d23a045e6cb46c023c15f8189ef3ee8b1ddf20 (diff)
transmitter-plugin: Attempt to use the compositor config file
As the compositor will load the configuration before the plug-in, use the environment variable provided by it to avoid reading any other configuration file. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I310bb1d76ef093d89210002fae065b571e9f2287
-rw-r--r--transmitter-plugin/plugin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/transmitter-plugin/plugin.c b/transmitter-plugin/plugin.c
index 2fb60b6..f7bbabf 100644
--- a/transmitter-plugin/plugin.c
+++ b/transmitter-plugin/plugin.c
@@ -899,10 +899,15 @@ load_config(struct weston_config **config, bool no_config,
{
const char *file = "agl-compositor.ini";
const char *full_path;
+ char *compositor_env_file = NULL;
if (config_file)
file = config_file;
+ compositor_env_file = getenv(WESTON_CONFIG_FILE_ENV_VAR);
+ if (compositor_env_file)
+ file = compositor_env_file;
+
if (!no_config)
*config = weston_config_parse(file);