config: add DrmDevice::make_render_device
This commit is contained in:
parent
c6c87bdaa1
commit
049b86f4e2
9 changed files with 91 additions and 32 deletions
|
|
@ -476,6 +476,10 @@ impl Client {
|
|||
pci_id
|
||||
}
|
||||
|
||||
pub fn make_render_device(&self, device: DrmDevice) {
|
||||
self.send(&ClientMessage::MakeRenderDevice { device });
|
||||
}
|
||||
|
||||
pub fn connector_connected(&self, connector: Connector) -> bool {
|
||||
let res = self.send_with_response(&ClientMessage::ConnectorConnected { connector });
|
||||
get_response!(res, false, ConnectorConnected { connected });
|
||||
|
|
|
|||
|
|
@ -313,6 +313,9 @@ pub enum ClientMessage<'a> {
|
|||
connector: Connector,
|
||||
enabled: bool,
|
||||
},
|
||||
MakeRenderDevice {
|
||||
device: DrmDevice,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
|
|
|
|||
|
|
@ -357,4 +357,9 @@ impl DrmDevice {
|
|||
pub fn pci_id(self) -> PciId {
|
||||
get!().drm_device_pci_id(self)
|
||||
}
|
||||
|
||||
/// Makes this device the render device.
|
||||
pub fn make_render_device(self) {
|
||||
get!().make_render_device(self);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue