diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-05-03 21:28:44 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-05-03 21:28:44 +1200 |
commit | d196a79b6c493d74d0057d74238353180d717255 (patch) | |
tree | 73e8cbe15779fa3b6a230750e04e0f7c252bb539 /example | |
parent | 0002b8dd08fdab7da12127ad2f43238f376b1a7a (diff) |
Changed backend to accept wl_display.
Diffstat (limited to 'example')
-rw-r--r-- | example/example-drm.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |