example: use set_connectors in raw_legacy_drm
This commit is contained in:
parent
4b2e19cade
commit
df097b835e
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue