From df097b835e4d6fbe351e130b0d364778e2fa9ded Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sun, 19 Apr 2020 22:23:16 +0200 Subject: [PATCH] example: use set_connectors in raw_legacy_drm --- examples/raw_legacy_drm.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/raw_legacy_drm.rs b/examples/raw_legacy_drm.rs index 4f0b05a..6afa248 100644 --- a/examples/raw_legacy_drm.rs +++ b/examples/raw_legacy_drm.rs @@ -81,13 +81,7 @@ fn main() { let surface = Rc::new(device.create_surface(crtc).unwrap()); surface.use_mode(Some(mode)).unwrap(); - for conn in surface.current_connectors().into_iter() { - if conn != connector_info.handle() { - surface.remove_connector(conn).unwrap(); - } - } - surface.add_connector(connector_info.handle()).unwrap(); - + surface.set_connectors(&[connector_info.handle()]).unwrap(); /* * Lets create buffers and framebuffers. * We use drm-rs DumbBuffers, because they always work and require little to no setup.