summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-08-13 17:33:25 +0200
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-08-13 17:33:25 +0200
commit5e9cba24039e8c4c0dfc19021e2273e695cf2c35 (patch)
tree623938e381f4fb2afb6201b365797b06ca5f52dd
parentef889d839bd5d21d43c5502ee0dd34f95274a085 (diff)
downloadweston-5e9cba24039e8c4c0dfc19021e2273e695cf2c35.tar.gz
weston-5e9cba24039e8c4c0dfc19021e2273e695cf2c35.tar.bz2
weston-5e9cba24039e8c4c0dfc19021e2273e695cf2c35.zip
WIP: fallback to fbdev if native backend is not possiblesandbox/pcoval/wip
Wont work since init is not reentrant Change-Id: I6ac123d3616641b15cdf54c47e65a002ee90aeae Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
-rw-r--r--src/compositor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 574db2de..bd6ca97b 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4238,6 +4238,15 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
ec = backend_init(display, &argc, argv, config);
+ if ( (ec == NULL) && strcmp(WESTON_NATIVE_BACKEND,"fbdev-backend.so") ) {
+ weston_log("warning: failed to init %s, trying to fallback to fbdev\n",WESTON_NATIVE_BACKEND);
+ backend = strdup("fbdev-backend.so");
+ backend_init = weston_load_module(backend, "backend_init");
+ free(backend);
+ if (!backend_init)
+ exit(EXIT_FAILURE);
+ ec = backend_init(display, &argc, argv, config);
+ }
if (ec == NULL) {
weston_log("fatal: failed to create compositor\n");
exit(EXIT_FAILURE);