example: use set_connectors in raw_legacy_drm

This commit is contained in:
Victor Brekenfeld 2020-04-19 22:23:16 +02:00
parent 4b2e19cade
commit df097b835e
1 changed files with 1 additions and 7 deletions

View File

@ -81,13 +81,7 @@ fn main() {
let surface = Rc::new(device.create_surface(crtc).unwrap()); let surface = Rc::new(device.create_surface(crtc).unwrap());
surface.use_mode(Some(mode)).unwrap(); surface.use_mode(Some(mode)).unwrap();
for conn in surface.current_connectors().into_iter() { surface.set_connectors(&[connector_info.handle()]).unwrap();
if conn != connector_info.handle() {
surface.remove_connector(conn).unwrap();
}
}
surface.add_connector(connector_info.handle()).unwrap();
/* /*
* Lets create buffers and framebuffers. * Lets create buffers and framebuffers.
* We use drm-rs DumbBuffers, because they always work and require little to no setup. * We use drm-rs DumbBuffers, because they always work and require little to no setup.