mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-20 19:51:04 +03:00
Refact/options (#9318)
* refact options Signed-off-by: fufesou <linlong1266@gmail.com> * Remove unused msg Signed-off-by: fufesou <linlong1266@gmail.com> * web, toggle virtual display Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -802,13 +802,13 @@ impl InvokeUiSession for FlutterHandler {
|
||||
|
||||
fn set_peer_info(&self, pi: &PeerInfo) {
|
||||
let displays = Self::make_displays_msg(&pi.displays);
|
||||
let mut features: HashMap<&str, i32> = Default::default();
|
||||
let mut features: HashMap<&str, bool> = Default::default();
|
||||
for ref f in pi.features.iter() {
|
||||
features.insert("privacy_mode", if f.privacy_mode { 1 } else { 0 });
|
||||
features.insert("privacy_mode", f.privacy_mode);
|
||||
}
|
||||
// compatible with 1.1.9
|
||||
if get_version_number(&pi.version) < get_version_number("1.2.0") {
|
||||
features.insert("privacy_mode", 0);
|
||||
features.insert("privacy_mode", false);
|
||||
}
|
||||
let features = serde_json::ser::to_string(&features).unwrap_or("".to_owned());
|
||||
let resolutions = serialize_resolutions(&pi.resolutions.resolutions);
|
||||
|
||||
Reference in New Issue
Block a user