Skip to content

Commit

Permalink
Merge pull request rustdesk#6460 from fufesou/feat/install_idd_when_i…
Browse files Browse the repository at this point in the history
…nstalling_app

feat, install indirect display driver when installing the app
  • Loading branch information
rustdesk authored Nov 19, 2023
2 parents ad96f9a + 3f3bca7 commit b2bb69f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ pub fn core_main() -> Option<Vec<String>> {
} else if args[0] == "--install-cert" {
#[cfg(windows)]
hbb_common::allow_err!(crate::platform::windows::install_cert(&args[1]));
#[cfg(all(windows, feature = "virtual_display_driver"))]
hbb_common::allow_err!(crate::virtual_display_manager::install_update_driver());
return None;
} else if args[0] == "--uninstall-cert" {
#[cfg(windows)]
Expand Down
7 changes: 7 additions & 0 deletions src/virtual_display_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ impl VirtualDisplayManager {
}
}

pub fn install_update_driver() -> ResultType<()> {
VIRTUAL_DISPLAY_MANAGER
.lock()
.unwrap()
.install_update_driver()
}

pub fn plug_in_headless() -> ResultType<()> {
let mut manager = VIRTUAL_DISPLAY_MANAGER.lock().unwrap();
manager.prepare_driver()?;
Expand Down

0 comments on commit b2bb69f

Please sign in to comment.