fix: mstsc switch, plug in virtual displays (#7913)

* fix: mstsc switch, plug in virtual displays

Signed-off-by: fufesou <shuanglongchen@yeah.ne>

* Update display_service.rs

---------

Signed-off-by: fufesou <shuanglongchen@yeah.ne>
Co-authored-by: fufesou <shuanglongchen@yeah.ne>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
fufesou
2024-05-06 14:01:59 +08:00
committed by GitHub
parent b5a88d00af
commit 846522037f
2 changed files with 41 additions and 5 deletions

View File

@@ -1231,8 +1231,12 @@ impl Connection {
} else {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{
#[cfg(not(all(windows, feature = "virtual_display_driver")))]
let displays = display_service::try_get_displays();
#[cfg(all(windows, feature = "virtual_display_driver"))]
let displays = display_service::try_get_displays_add_amyuni_headless();
pi.resolutions = Some(SupportedResolutions {
resolutions: display_service::try_get_displays()
resolutions: displays
.map(|displays| {
displays
.get(self.display_idx)