1
0
Fork 0
forked from wry/wry

implement wlr-gamma-control-unstable-v1

This commit is contained in:
khyperia 2026-01-24 20:26:51 +01:00 committed by Julian Orth
parent 11b3f08514
commit b1db715a90
26 changed files with 475 additions and 21 deletions

View file

@ -380,7 +380,7 @@ impl DrmMaster {
res
}
pub fn create_blob<T>(self: &Rc<Self>, t: &T) -> Result<PropBlob, DrmError> {
pub fn create_blob<T: ?Sized>(self: &Rc<Self>, t: &T) -> Result<PropBlob, DrmError> {
match mode_create_blob(self.raw(), t) {
Ok(b) => Ok(PropBlob {
master: self.clone(),

View file

@ -917,9 +917,9 @@ struct drm_mode_create_blob {
const DRM_IOCTL_MODE_CREATEPROPBLOB: u64 = drm_iowr::<drm_mode_create_blob>(0xbd);
pub fn mode_create_blob<T>(fd: c::c_int, t: &T) -> Result<DrmBlob, OsError> {
pub fn mode_create_blob<T: ?Sized>(fd: c::c_int, t: &T) -> Result<DrmBlob, OsError> {
let mut res = drm_mode_create_blob {
data: t as *const T as _,
data: t as *const T as *const () as _,
length: size_of_val(t) as _,
blob_id: 0,
};