From 96741e5270a5d2abf63ae77bc0c6e0b4fc50ff79 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 25 May 2023 17:29:15 +0800 Subject: [PATCH] fix commit --- src/platform/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/mod.rs b/src/platform/mod.rs index c376a610a..60ef1806b 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -46,6 +46,7 @@ pub fn breakdown_callback() { #[cfg(not(any(target_os = "android", target_os = "ios")))] pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType<()> { + let cur_resolution = current_resolution(name)?; // For MacOS // to-do: Make sure the following comparison works. // For Linux @@ -57,7 +58,6 @@ pub fn change_resolution(name: &str, width: usize, height: usize) -> ResultType< 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) }