try fix build ios

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-05-19 12:57:03 +08:00
parent 25a9bbf382
commit e50d50f177
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)
}