1
0
Fork 0
forked from wry/wry

config: tell the config about drm devices

This commit is contained in:
Julian Orth 2022-05-10 16:43:09 +02:00
parent 99fcd63438
commit e27cf29693
23 changed files with 581 additions and 50 deletions

View file

@ -1,7 +1,11 @@
use {
crate::keyboard::{keymap::Keymap, ModifiedKeySym},
bincode::{Decode, Encode},
std::{collections::HashMap, time::Duration},
std::{
collections::HashMap,
fmt::{Debug, Display, Formatter},
time::Duration,
},
};
#[macro_use]
@ -129,3 +133,15 @@ pub fn reload() {
pub fn is_reload() -> bool {
get!(false).is_reload()
}
#[derive(Encode, Decode, Debug, Copy, Clone, Hash, Eq, PartialEq, Default)]
pub struct PciId {
pub vendor: u32,
pub model: u32,
}
impl Display for PciId {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{:04x}:{:04x}", self.vendor, self.model)
}
}