mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 11:41:29 +03:00
refact: remove virtual_display_driver (#7915)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
#[cfg(windows)]
|
||||
use crate::platform::is_installed;
|
||||
use crate::ui_interface::get_option;
|
||||
#[cfg(windows)]
|
||||
@@ -27,9 +27,9 @@ pub mod win_mag;
|
||||
#[cfg(windows)]
|
||||
pub mod win_topmost_window;
|
||||
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
#[cfg(windows)]
|
||||
mod win_virtual_display;
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
#[cfg(windows)]
|
||||
pub use win_virtual_display::restore_reg_connectivity;
|
||||
|
||||
pub const INVALID_PRIVACY_MODE_CONN_ID: i32 = 0;
|
||||
@@ -44,7 +44,7 @@ pub const PRIVACY_MODE_IMPL_WIN_MAG: &str = win_mag::PRIVACY_MODE_IMPL;
|
||||
pub const PRIVACY_MODE_IMPL_WIN_EXCLUDE_FROM_CAPTURE: &str =
|
||||
win_exclude_from_capture::PRIVACY_MODE_IMPL;
|
||||
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
#[cfg(windows)]
|
||||
pub const PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY: &str = win_virtual_display::PRIVACY_MODE_IMPL;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
@@ -103,16 +103,9 @@ lazy_static::lazy_static! {
|
||||
if display_service::is_privacy_mode_mag_supported() {
|
||||
PRIVACY_MODE_IMPL_WIN_MAG
|
||||
} else {
|
||||
#[cfg(feature = "virtual_display_driver")]
|
||||
{
|
||||
if is_installed() {
|
||||
PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
#[cfg(not(feature = "virtual_display_driver"))]
|
||||
{
|
||||
if is_installed() {
|
||||
PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
@@ -157,7 +150,6 @@ lazy_static::lazy_static! {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(feature = "virtual_display_driver")]
|
||||
map.insert(win_virtual_display::PRIVACY_MODE_IMPL, |impl_key: &str| {
|
||||
Box::new(win_virtual_display::PrivacyModeImpl::new(impl_key))
|
||||
});
|
||||
@@ -336,7 +328,6 @@ pub fn get_supported_privacy_mode_impl() -> Vec<(&'static str, &'static str)> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "virtual_display_driver")]
|
||||
if is_installed() && crate::platform::windows::is_self_service_running() {
|
||||
vec_impls.push((
|
||||
PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY,
|
||||
|
||||
Reference in New Issue
Block a user