aboutsummaryrefslogtreecommitdiff
path: root/example/example-drm.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-05-03 22:40:19 +1200
committerScott Anderson <ascent12@hotmail.com>2017-05-03 22:41:49 +1200
commitef9768858e5befde26db2cc4fec26a5e5bd0fe22 (patch)
tree48d4c4b579cb453472b72b985dcc682acd98235f /example/example-drm.c
parentd196a79b6c493d74d0057d74238353180d717255 (diff)
Changed modesetting interface.
Diffstat (limited to 'example/example-drm.c')
-rw-r--r--example/example-drm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/example/example-drm.c b/example/example-drm.c
index 35a4f9a2..a2643949 100644
--- a/example/example-drm.c
+++ b/example/example-drm.c
@@ -23,8 +23,10 @@ void output_add(struct wl_listener *listener, void *data)
{
struct wlr_drm_output *out = data;
- fprintf(stderr, "Output added\n");
- wlr_drm_output_modeset(out, "preferred");
+ size_t num_modes;
+ struct wlr_drm_mode *modes = wlr_drm_output_get_modes(out, &num_modes);
+
+ wlr_drm_output_modeset(out, &modes[0]);
}
void output_rem(struct wl_listener *listener, void *data)
@@ -115,4 +117,5 @@ int main()
wl_event_source_remove(timer);
wlr_drm_backend_free(wlr);
+ wl_display_destroy(display);
}