From 5e9cba24039e8c4c0dfc19021e2273e695cf2c35 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 13 Aug 2014 17:33:25 +0200 Subject: WIP: fallback to fbdev if native backend is not possible Wont work since init is not reentrant Change-Id: I6ac123d3616641b15cdf54c47e65a002ee90aeae Signed-off-by: Philippe Coval --- src/compositor.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- cgit v1.2.3