mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 09:01:28 +03: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:
@@ -101,11 +101,11 @@ fn get_atom_name(conn: *mut xcb_connection_t, atom: xcb_atom_t) -> String {
|
||||
return empty;
|
||||
}
|
||||
unsafe {
|
||||
let mut e: xcb_generic_error_t = std::mem::zeroed();
|
||||
let mut e: *mut xcb_generic_error_t = std::ptr::null_mut();
|
||||
let reply = xcb_get_atom_name_reply(
|
||||
conn,
|
||||
xcb_get_atom_name(conn, atom),
|
||||
&mut ((&mut e) as *mut xcb_generic_error_t) as _,
|
||||
&mut e as _,
|
||||
);
|
||||
if reply == std::ptr::null() {
|
||||
return empty;
|
||||
|
||||
Reference in New Issue
Block a user