From de66bdb8679de14377306b7a903f2bc5d62fd169 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Sun, 13 Aug 2017 23:05:57 +0200 Subject: Add backend detection functions Resolves #80 --- backend/drm/backend.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/drm') diff --git a/backend/drm/backend.c b/backend/drm/backend.c index a2c9dff3..a84130ee 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -52,6 +52,10 @@ static struct wlr_backend_impl backend_impl = { .get_egl = wlr_drm_backend_get_egl }; +bool wlr_backend_is_drm(struct wlr_backend *b) { + return b->impl == &backend_impl; +} + static void session_signal(struct wl_listener *listener, void *data) { struct wlr_drm_backend *backend = wl_container_of(listener, backend, session_signal); -- cgit v1.2.3