From d196a79b6c493d74d0057d74238353180d717255 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 3 May 2017 21:28:44 +1200 Subject: Changed backend to accept wl_display. --- example/example-drm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/example-drm.c b/example/example-drm.c index 072e5ce4..35a4f9a2 100644 --- a/example/example-drm.c +++ b/example/example-drm.c @@ -93,16 +93,18 @@ int main() wl_list_init(&state.render.link); clock_gettime(CLOCK_MONOTONIC, &state.last_frame); + struct wl_display *display = wl_display_create(); + struct wl_event_loop *event_loop = wl_display_get_event_loop(display); + struct wlr_session *session = wlr_session_start(); if (!session) { return 1; } - struct wlr_drm_backend *wlr = wlr_drm_backend_init(session, + struct wlr_drm_backend *wlr = wlr_drm_backend_init(display, session, &state.add, &state.rem, &state.render); bool done = false; - struct wl_event_loop *event_loop = wlr_drm_backend_get_event_loop(wlr); struct wl_event_source *timer = wl_event_loop_add_timer(event_loop, timer_done, &done); -- cgit v1.2.3