mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
better conditional compilation
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
10
src/ipc.rs
10
src/ipc.rs
@@ -186,6 +186,7 @@ pub enum Data {
|
||||
},
|
||||
SystemInfo(Option<String>),
|
||||
ClickTime(i64),
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
MouseMoveTime(i64),
|
||||
Authorize,
|
||||
Close,
|
||||
@@ -332,6 +333,7 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
let t = crate::server::CLICK_TIME.load(Ordering::SeqCst);
|
||||
allow_err!(stream.send(&Data::ClickTime(t)).await);
|
||||
}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
Data::MouseMoveTime(_) => {
|
||||
let t = crate::server::MOUSE_MOVE_TIME.load(Ordering::SeqCst);
|
||||
allow_err!(stream.send(&Data::MouseMoveTime(t)).await);
|
||||
@@ -345,13 +347,7 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
}
|
||||
}
|
||||
Data::OnlineStatus(_) => {
|
||||
let x = config::ONLINE
|
||||
.lock()
|
||||
.unwrap()
|
||||
.values()
|
||||
.max()
|
||||
.unwrap_or(&0)
|
||||
.clone();
|
||||
let x = config::get_online_statue();
|
||||
let confirmed = Config::get_key_confirmed();
|
||||
allow_err!(stream.send(&Data::OnlineStatus(Some((x, confirmed)))).await);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user