From 63129582cc727567b9521d16ffcc69575f9612c2 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 25 May 2023 17:25:52 +0800 Subject: [PATCH] stupid warn position --- src/platform/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 1aead8543..c376a610a 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -46,9 +46,6 @@ pub fn breakdown_callback() { #[cfg(not(any(target_os = "android", target_os = "ios")))] pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType<()> { - hbb_common::log::warn!("Change resolution of '{}' to ({},{})", name, width, height); - - let cur_resolution = current_resolution(name)?; // For MacOS // to-do: Make sure the following comparison works. // For Linux @@ -59,6 +56,8 @@ pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType< if cur_resolution.width as usize == width && cur_resolution.height as usize == height { return Ok(()); } + hbb_common::log::warn!("Change resolution of '{}' to ({},{})", name, width, height); + let cur_resolution = current_resolution(name)?; change_resolution_directly(name, width, height) }