mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-25 05:09:04 +08:00
Merge pull request #3727 from fufesou/refact/peer_info_platform_additions
better peer info
This commit is contained in:
commit
759092c545
@ -843,14 +843,15 @@ impl Connection {
|
||||
pi.hostname = DEVICE_NAME.lock().unwrap().clone();
|
||||
pi.platform = "Android".into();
|
||||
}
|
||||
|
||||
let mut platform_additions = serde_json::Map::new();
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
pi.platform_additions = format!(r#"
|
||||
{{
|
||||
"is_wayland": {}
|
||||
}}
|
||||
"#, crate::platform::current_is_wayland());
|
||||
if crate::platform::current_is_wayland() {
|
||||
platform_additions.insert("is_wayland".into(), json!(true));
|
||||
}
|
||||
}
|
||||
if !platform_additions.is_empty() {
|
||||
pi.platform_additions = serde_json::to_string(&platform_additions).unwrap_or("".into());
|
||||
}
|
||||
|
||||
#[cfg(feature = "hwcodec")]
|
||||
|
Loading…
Reference in New Issue
Block a user