backend: add preliminary support for driver detection

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-20 00:21:38 +01:00
parent a2d0d5c826
commit 685a583f84
7 changed files with 132 additions and 1 deletions

View File

@ -1311,6 +1311,9 @@ static bool redir_start(session_t *ps) {
ps->redirected = true;
// Re-detect driver since we now have a backend
ps->drivers = detect_driver(ps->c, ps->backend_data, ps->root);
root_damaged(ps);
// Repaint the whole screen
@ -1985,6 +1988,8 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
// of OpenGL context.
init_overlay(ps);
ps->drivers = detect_driver(ps->c, ps->backend_data, ps->root);
// Initialize filters, must be preceded by OpenGL context creation
if (!ps->o.experimental_backends && !init_render(ps)) {
log_fatal("Failed to initialize the backend");