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.hostname = DEVICE_NAME.lock().unwrap().clone();
|
||||||
pi.platform = "Android".into();
|
pi.platform = "Android".into();
|
||||||
}
|
}
|
||||||
|
let mut platform_additions = serde_json::Map::new();
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
{
|
{
|
||||||
pi.platform_additions = format!(r#"
|
if crate::platform::current_is_wayland() {
|
||||||
{{
|
platform_additions.insert("is_wayland".into(), json!(true));
|
||||||
"is_wayland": {}
|
}
|
||||||
}}
|
}
|
||||||
"#, crate::platform::current_is_wayland());
|
if !platform_additions.is_empty() {
|
||||||
|
pi.platform_additions = serde_json::to_string(&platform_additions).unwrap_or("".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "hwcodec")]
|
#[cfg(feature = "hwcodec")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user