fix: build (#9036)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-08-12 22:15:59 +08:00 committed by GitHub
parent 83bf067d18
commit 8f00067266
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 11 deletions

View File

@ -38,14 +38,9 @@ pub const TURN_OFF_OTHER_ID: &'static str =
"Failed to turn off privacy mode that belongs to someone else."; "Failed to turn off privacy mode that belongs to someone else.";
pub const NO_PHYSICAL_DISPLAYS: &'static str = "no_need_privacy_mode_no_physical_displays_tip"; pub const NO_PHYSICAL_DISPLAYS: &'static str = "no_need_privacy_mode_no_physical_displays_tip";
#[cfg(windows)] pub const PRIVACY_MODE_IMPL_WIN_MAG: &str = "privacy_mode_impl_mag";
pub const PRIVACY_MODE_IMPL_WIN_MAG: &str = win_mag::PRIVACY_MODE_IMPL; pub const PRIVACY_MODE_IMPL_WIN_EXCLUDE_FROM_CAPTURE: &str = "privacy_mode_impl_exclude_from_capture";
#[cfg(windows)] pub const PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY: &str = "privacy_mode_impl_virtual_display";
pub const PRIVACY_MODE_IMPL_WIN_EXCLUDE_FROM_CAPTURE: &str =
win_exclude_from_capture::PRIVACY_MODE_IMPL;
#[cfg(windows)]
pub const PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY: &str = win_virtual_display::PRIVACY_MODE_IMPL;
#[derive(Debug, Serialize, Deserialize, Clone)] #[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(tag = "t", content = "c")] #[serde(tag = "t", content = "c")]

View File

@ -2,7 +2,7 @@ use hbb_common::platform::windows::is_windows_version_or_greater;
pub use super::win_topmost_window::PrivacyModeImpl; pub use super::win_topmost_window::PrivacyModeImpl;
pub(super) const PRIVACY_MODE_IMPL: &str = "privacy_mode_impl_exclude_from_capture"; pub(super) const PRIVACY_MODE_IMPL: &str = super::PRIVACY_MODE_IMPL_WIN_EXCLUDE_FROM_CAPTURE;
pub(super) fn is_supported() -> bool { pub(super) fn is_supported() -> bool {
// https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity // https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity

View File

@ -4,7 +4,7 @@ use std::time::Instant;
pub use super::win_topmost_window::PrivacyModeImpl; pub use super::win_topmost_window::PrivacyModeImpl;
pub(super) const PRIVACY_MODE_IMPL: &str = "privacy_mode_impl_mag"; pub(super) const PRIVACY_MODE_IMPL: &str = super::PRIVACY_MODE_IMPL_WIN_MAG;
pub fn create_capturer( pub fn create_capturer(
privacy_mode_id: i32, privacy_mode_id: i32,

View File

@ -27,7 +27,7 @@ use winapi::{
}, },
}; };
pub(super) const PRIVACY_MODE_IMPL: &str = "privacy_mode_impl_virtual_display"; pub(super) const PRIVACY_MODE_IMPL: &str = super::PRIVACY_MODE_IMPL_WIN_VIRTUAL_DISPLAY;
const CONFIG_KEY_REG_RECOVERY: &str = "reg_recovery"; const CONFIG_KEY_REG_RECOVERY: &str = "reg_recovery";