mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-01 09:59:19 +08:00
fix, virtual dislay reset
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
7480ead76a
commit
de44f8565d
@ -139,12 +139,10 @@ pub fn plug_in_index_modes(
|
||||
}
|
||||
|
||||
pub fn reset_all() -> ResultType<()> {
|
||||
let mut manager = VIRTUAL_DISPLAY_MANAGER.lock().unwrap();
|
||||
if !manager.peer_index_name.is_empty() || manager.headless_index_name.is_some() {
|
||||
manager.install_update_driver()?;
|
||||
manager.peer_index_name.clear();
|
||||
manager.headless_index_name = None;
|
||||
if let Err(e) = plug_out_peer_request(&get_virtual_displays()) {
|
||||
log::error!("Failed to plug out virtual displays: {}", e);
|
||||
}
|
||||
let _ = plug_out_headless();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user