fix plugout virtual monitor

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-28 13:19:48 +08:00
parent 8a9af3a755
commit 84ab9ba48e
2 changed files with 7 additions and 2 deletions

View File

@@ -927,7 +927,9 @@ fn try_get_displays() -> ResultType<Vec<Display>> {
}
} else if displays.len() > 1 {
// If more than one displays exists, close RustDeskVirtualDisplay
let _res = virtual_display_manager::plug_in_headless();
if virtual_display_manager::plug_out_headless() {
displays = Display::all()?;
}
}
Ok(displays)
}