Merge pull request #4419 from fufesou/fix/build_ios

try fix build ios
This commit is contained in:
RustDesk 2023-05-19 13:34:40 +08:00 committed by GitHub
commit 0fa2bfd136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ use hbb_common::protobuf::Message as _;
use hbb_common::rendezvous_proto::ConnType;
#[cfg(not(any(target_os = "android", target_os = "ios")))]
use hbb_common::sleep;
#[cfg(not(target_os = "ios"))]
use hbb_common::tokio::sync::mpsc::error::TryRecvError;
#[cfg(windows)]
use hbb_common::tokio::sync::Mutex as TokioMutex;

View File

@ -881,6 +881,7 @@ pub fn main_handle_relay_id(id: String) -> String {
}
pub fn main_get_current_display() -> SyncReturn<String> {
#[cfg(not(target_os = "ios"))]
let display_info = match crate::video_service::get_current_display() {
Ok((_, _, display)) => serde_json::to_string(&HashMap::from([
("w", display.width()),
@ -889,6 +890,8 @@ pub fn main_get_current_display() -> SyncReturn<String> {
.unwrap_or_default(),
Err(..) => "".to_string(),
};
#[cfg(target_os = "ios")]
let display_info = "".to_owned();
SyncReturn(display_info)
}