Skip to content

Commit

Permalink
Merge pull request rustdesk#5528 from fufesou/refact/remove_virtual_d…
Browse files Browse the repository at this point in the history
…isplay_tmp

remove virtual display
  • Loading branch information
rustdesk authored Aug 28, 2023
2 parents f309ae0 + 173984f commit 0ee2b02
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/server/video_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,16 +1016,16 @@ fn no_displays(displays: &Vec<Display>) -> bool {

#[cfg(all(windows, feature = "virtual_display_driver"))]
fn try_get_displays() -> ResultType<Vec<Display>> {
let mut displays = Display::all()?;
if no_displays(&displays) {
log::debug!("no displays, create virtual display");
if let Err(e) = virtual_display_manager::plug_in_headless() {
log::error!("plug in headless failed {}", e);
} else {
displays = Display::all()?;
}
}
Ok(displays)
// let mut displays = Display::all()?;
// if no_displays(&displays) {
// log::debug!("no displays, create virtual display");
// if let Err(e) = virtual_display_manager::plug_in_headless() {
// log::error!("plug in headless failed {}", e);
// } else {
// displays = Display::all()?;
// }
// }
Ok( Display::all()?)
}

pub(super) fn get_current_display_2(mut all: Vec<Display>) -> ResultType<(usize, usize, Display)> {
Expand Down

0 comments on commit 0ee2b02

Please sign in to comment.