fix build
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
700a59ea72
commit
8353afb02d
@ -8,12 +8,10 @@ use std::{
|
||||
use bytes::Bytes;
|
||||
|
||||
pub use connection::*;
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::config::Config2;
|
||||
use hbb_common::tcp::{self, new_listener};
|
||||
use hbb_common::{
|
||||
allow_err,
|
||||
anyhow::{anyhow, Context},
|
||||
anyhow::Context,
|
||||
bail,
|
||||
config::{Config, CONNECT_TIMEOUT, RELAY_PORT},
|
||||
log,
|
||||
@ -25,6 +23,8 @@ use hbb_common::{
|
||||
timeout, tokio, ResultType, Stream,
|
||||
};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::{anyhow::anyhow, config::Config2};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use service::ServiceTmpl;
|
||||
use service::{GenericService, Service, Subscriber};
|
||||
|
||||
|
@ -1936,6 +1936,7 @@ impl Connection {
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
fn change_resolution(&mut self, r: &Resolution) {
|
||||
if self.keyboard {
|
||||
if let Ok(name) = video_service::get_current_display_name() {
|
||||
@ -2148,6 +2149,7 @@ impl Connection {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
if let Some(custom_resolution) = o.custom_resolution.as_ref() {
|
||||
if custom_resolution.width > 0 && custom_resolution.height > 0 {
|
||||
self.change_resolution(&custom_resolution);
|
||||
|
@ -113,6 +113,7 @@ fn update_get_original_resolution_(display_name: &str, w: usize, h: usize) -> Re
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
pub fn reset_resolutions() {
|
||||
for (name, (w, h)) in ORIGINAL_RESOLUTIONS.read().unwrap().iter() {
|
||||
if let Err(e) = crate::platform::change_resolution(name, *w as _, *h as _) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user