diff --git a/src/common.rs b/src/common.rs index efda69dbd..cadf7330d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -49,6 +49,11 @@ pub const DST_STRIDE_RGBA: usize = 1; // the executable name of the portable version pub const PORTABLE_APPNAME_RUNTIME_ENV_KEY: &str = "RUSTDESK_APPNAME"; +pub const PLATFORM_WINDOWS: &str = "Windows"; +pub const PLATFORM_LINUX: &str = "Linux"; +pub const PLATFORM_MACOS: &str = "Mac OS"; +pub const PLATFORM_ANDROID: &str = "Android"; + pub mod input { pub const MOUSE_TYPE_MOVE: i32 = 0; pub const MOUSE_TYPE_DOWN: i32 = 1; diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 6492e5e25..e962ef9d5 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -26,11 +26,6 @@ use hbb_common::{message_proto::CursorData, ResultType}; #[cfg(not(any(target_os = "macos", target_os = "android", target_os = "ios")))] const SERVICE_INTERVAL: u64 = 300; -pub const PLATFORM_WINDOWS: &str = "Windows"; -pub const PLATFORM_LINUX: &str = "Linux"; -pub const PLATFORM_MACOS: &str = "Mac OS"; -pub const PLATFORM_ANDROID: &str = "Android"; - pub fn is_xfce() -> bool { #[cfg(target_os = "linux")] { diff --git a/src/ui_session_interface.rs b/src/ui_session_interface.rs index be0185d30..effd293a6 100644 --- a/src/ui_session_interface.rs +++ b/src/ui_session_interface.rs @@ -412,7 +412,7 @@ impl Session { pub fn get_path_sep(&self, is_remote: bool) -> &'static str { let p = self.get_platform(is_remote); - if &p == crate::platform::PLATFORM_WINDOWS { + if &p == crate::PLATFORM_WINDOWS { return "\\"; } else { return "/";