mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -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 _) {
|
||||
|
||||
Reference in New Issue
Block a user