mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-05 16:38:17 +00:00
macos, periodically check if current display is changed
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
1 parent
f71d4e9e81
commit
b8b3e99602
4 files changed
+14
-7
No files matched your search
@@ -612,18 +612,18 @@ pub fn resolutions(name: &str) -> Vec<Resolution> {
|
||||
unsafe {
|
||||
if YES == MacGetModeNum(display, &mut num) {
|
||||
let (mut widths, mut heights) = (vec![0; num as _], vec![0; num as _]);
|
||||
let mut realNum = 0;
|
||||
let mut real_num = 0;
|
||||
if YES
|
||||
== MacGetModes(
|
||||
display,
|
||||
widths.as_mut_ptr(),
|
||||
heights.as_mut_ptr(),
|
||||
num,
|
||||
&mut realNum,
|
||||
&mut real_num,
|
||||
)
|
||||
{
|
||||
if realNum <= num {
|
||||
for i in 0..realNum {
|
||||
if real_num <= num {
|
||||
for i in 0..real_num {
|
||||
let resolution = Resolution {
|
||||
width: widths[i as usize] as _,
|
||||
height: heights[i as usize] as _,
|
||||
|
||||
Reference in new issue
Block a user