improve ffi enum data size, fix compile warning on mac

This commit is contained in:
rustdesk
2023-02-08 19:17:59 +08:00
parent 7c13be5876
commit 4134b77680
8 changed files with 65 additions and 57 deletions

View File

@@ -845,6 +845,7 @@ pub fn elevate_portable(_id: i32) {
}
}
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
#[inline]
pub fn handle_incoming_voice_call(id: i32, accept: bool) {
if let Some(client) = CLIENTS.write().unwrap().get_mut(&id) {
@@ -852,9 +853,10 @@ pub fn handle_incoming_voice_call(id: i32, accept: bool) {
};
}
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
#[inline]
pub fn close_voice_call(id: i32) {
if let Some(client) = CLIENTS.write().unwrap().get_mut(&id) {
allow_err!(client.tx.send(Data::CloseVoiceCall("".to_owned())));
};
}
}