diff options
author | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-08-13 17:33:25 +0200 |
---|---|---|
committer | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-08-13 17:33:25 +0200 |
commit | 5e9cba24039e8c4c0dfc19021e2273e695cf2c35 (patch) | |
tree | 623938e381f4fb2afb6201b365797b06ca5f52dd | |
parent | ef889d839bd5d21d43c5502ee0dd34f95274a085 (diff) | |
download | weston-sandbox/pcoval/wip.tar.gz weston-sandbox/pcoval/wip.tar.bz2 weston-sandbox/pcoval/wip.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.c | 9 |
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); |