mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Warn on MIT-SHM not working on Linux X11 (#6856)
* Clarify video capture method * fix improper level of pointer usage of xcb_generic_error_t * add ffi of xcb_shm_query_version * throw a warn about MIT-SHM not working * add missing #[cfg] * checks SHM validity on the fly, rather than cache on creation --------- Co-authored-by: root <root@localhost> Co-authored-by: rustdesk-fork <rustdesk@fork.com>
This commit is contained in:
@@ -41,7 +41,7 @@ pub struct PixelBuffer<'a> {
|
||||
}
|
||||
|
||||
impl<'a> PixelBuffer<'a> {
|
||||
pub fn new(data: &'a [u8], pixfmt: Pixfmt, width:usize, height: usize) -> Self {
|
||||
pub fn new(data: &'a [u8], pixfmt: Pixfmt, width: usize, height: usize) -> Self {
|
||||
let stride0 = data.len() / height;
|
||||
let mut stride = Vec::new();
|
||||
stride.push(stride0);
|
||||
@@ -131,4 +131,8 @@ impl Display {
|
||||
pub fn name(&self) -> String {
|
||||
self.0.name()
|
||||
}
|
||||
|
||||
pub fn get_shm_status(&self) -> Result<(), x11::Error> {
|
||||
self.0.server().get_shm_status()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user