mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-08 23:21:28 +03:00
fix: macos, hidpi, resolutions (#11825)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -3093,10 +3093,18 @@ impl Connection {
|
||||
if virtual_display_manager::amyuni_idd::is_my_display(&name) {
|
||||
record_changed = false;
|
||||
}
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let scale = 1.0;
|
||||
#[cfg(target_os = "macos")]
|
||||
let scale = display.scale();
|
||||
let original = (
|
||||
((display.width() as f64) / scale).round() as _,
|
||||
(display.height() as f64 / scale).round() as _,
|
||||
);
|
||||
if record_changed {
|
||||
display_service::set_last_changed_resolution(
|
||||
&name,
|
||||
(display.width() as _, display.height() as _),
|
||||
original,
|
||||
(r.width, r.height),
|
||||
);
|
||||
}
|
||||
@@ -4424,7 +4432,7 @@ mod raii {
|
||||
*WALLPAPER_REMOVER.lock().unwrap() = None;
|
||||
}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
display_service::reset_resolutions();
|
||||
display_service::restore_resolutions();
|
||||
#[cfg(windows)]
|
||||
let _ = virtual_display_manager::reset_all();
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
Reference in New Issue
Block a user