mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 20:21:09 +03:00
refact: macos, comments, resolution list (#11830)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -890,6 +890,17 @@ pub fn handle_application_should_open_untitled_file() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get all resolutions of the display. The resolutions are:
|
||||
/// 1. Sorted by width and height in descending order, with duplicates removed.
|
||||
/// 2. Filtered out if the width is less than 800 (800x600) if there are too many (e.g., >15).
|
||||
/// 3. Contain HiDPI resolutions and the real resolutions.
|
||||
///
|
||||
/// We don't need to distinguish between HiDPI and real resolutions.
|
||||
/// When the controlling side changes the resolution, it will call `change_resolution_directly()`.
|
||||
/// `change_resolution_directly()` will try to use the HiDPI resolution first.
|
||||
/// This is how teamviewer does it for now.
|
||||
///
|
||||
/// If we need to distinguish HiDPI and real resolutions, we can add a flag to the `Resolution` struct.
|
||||
pub fn resolutions(name: &str) -> Vec<Resolution> {
|
||||
let mut v = vec![];
|
||||
if let Ok(display) = name.parse::<u32>() {
|
||||
|
||||
Reference in New Issue
Block a user