From d87f29c679404d1d37f227cd0320e47a553841de Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 12 Feb 2022 11:50:39 +0800 Subject: [PATCH] traditional chinese --- src/lang.rs | 2 ++ src/platform/mod.rs | 1 + src/server/connection.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lang.rs b/src/lang.rs index 7d9c70b9b..4f2171c0a 100644 --- a/src/lang.rs +++ b/src/lang.rs @@ -5,6 +5,7 @@ mod cn; mod en; mod fr; mod it; +mod tw; #[cfg(not(any(target_os = "android", target_os = "ios")))] pub fn translate(name: String) -> String { @@ -28,6 +29,7 @@ pub fn translate_locale(name: String, locale: &str) -> String { "fr" => fr::T.deref(), "cn" => cn::T.deref(), "it" => it::T.deref(), + "tw" => tw::T.deref(), _ => en::T.deref(), }; if let Some(v) = m.get(&name as &str) { diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 2ec552f26..d446f1206 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -15,6 +15,7 @@ pub mod macos; pub mod linux; use hbb_common::{message_proto::CursorData, ResultType}; +#[cfg(not(target_os = "macos"))] const SERVICE_INTERVAL: u64 = 300; pub fn is_xfce() -> bool { diff --git a/src/server/connection.rs b/src/server/connection.rs index 682c70888..9b8b43f25 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -174,7 +174,7 @@ impl Connection { }, ); - let handler_input = std::thread::spawn(move || Self::handle_input(rx_input, tx_cloned)); + std::thread::spawn(move || Self::handle_input(rx_input, tx_cloned)); loop { tokio::select! {