summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-09-24 01:17:08 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-09-24 01:17:08 +0100
commite69a27a81c65dcdb00d846dab32eadb7e0b20dda (patch)
tree8ccce5fbcb9dcdd4d3403c4d444e9ba2d476a2fc
parent2c91a2c24d0444c30526d9e7e89cd3a39b8ab5c4 (diff)
downloadenlightenment-e69a27a81c65dcdb00d846dab32eadb7e0b20dda.tar.gz
e comp - tell user about invalid env var options
it seems people are using these env vars so we should tell them if they have invalid options.
-rw-r--r--src/bin/e_comp.c46
1 files changed, 38 insertions, 8 deletions
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 42a47736cd..6727d40286 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1094,22 +1094,52 @@ e_comp_init(void)
e_comp_config_get()->engine = E_COMP_ENGINE_GL;
else if (!strcmp(gl, "sw"))
e_comp_config_get()->engine = E_COMP_ENGINE_SW;
+ else
+ {
+ fprintf(stderr,
+ "ERROR: E_COMP_ENGINE value '%s' invalid.\n"
+ "Please use 'gl' or 'sw'.\n"
+ "Valid values below that request a type of acceleration:\n"
+ " 'gl' : OpenGL based acceleration.\n"
+ " 'sw' : CPU based Software rendering.\n",
+ gl);
+ exit(101);
+ }
}
}
{
const char *eng;
-
+
eng = getenv("E_WL_FORCE");
if (eng)
{
- char buf[128];
-
- snprintf(buf, sizeof(buf), "wl_%s", eng);
- e_xkb_init(E_PIXMAP_TYPE_WL);
- if (e_module_enable(e_module_new(buf)))
+ if ((!strcmp(eng, "buffer")) ||
+ (!strcmp(eng, "drm")) ||
+ (!strcmp(eng, "wl")) ||
+ (!strcmp(eng, "x11")))
+ {
+ char buf[128];
+
+ snprintf(buf, sizeof(buf), "wl_%s", eng);
+ e_xkb_init(E_PIXMAP_TYPE_WL);
+ if (e_module_enable(e_module_new(buf)))
+ {
+ e_comp->comp_type = E_PIXMAP_TYPE_WL;
+ goto out;
+ }
+ }
+ else
{
- e_comp->comp_type = E_PIXMAP_TYPE_WL;
- goto out;
+ fprintf(stderr,
+ "ERROR: E_WL_FORCE value '%s' invalid.\n"
+ "Please use 'buffer', 'drm', 'wl' or 'x11'\n"
+ "Valid values below that request a type of rendering output target:\n"
+ " 'buffer' : Invisible memory buffer. (Debugging/testing)\n"
+ " 'drm' : DRM/KMS framebuffer. (You want this as a normal full-screen stand-alone Wayland compositor)\n"
+ " 'wl' : Window as a Wayland application. (Compositor in a Window for debugging/development/testing)\n"
+ " 'x11' : Window as a X11 application. (Compositor in a Window for debugging/development/testing)\n",
+ eng);
+ exit(101);
}
}
}