remove virtual display, beccause it sometimes unable to install(with the exclamation) and there's an connecting bug

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-08-28 10:44:24 +08:00
parent f309ae0c67
commit 173984ffd4

View File

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