tmp commit

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-07-09 00:41:23 +08:00
parent 8bb851704a
commit 32c349dd8b
4 changed files with 20 additions and 7 deletions

View File

@@ -910,7 +910,7 @@ pub mod connection_manager {
#[inline]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn start_listen_ipc_thread() {
fn start_listen_ipc_thread() {
start_listen_ipc(true);
}
@@ -931,8 +931,22 @@ pub mod connection_manager {
}
}
#[cfg(target_os = "windows")]
extern "C" fn cm_clear_hook() {
#[cfg(target_os = "windows")]
crate::privacy_win_mag::stop();
}
#[inline]
pub fn cm_init() {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
start_listen_ipc_thread();
#[cfg(target_os = "windows")]
shutdown_hooks::add_shutdown_hook(cm_clear_hook);
}
#[inline]
pub fn cm_clear() {
#[cfg(target_os = "windows")]
crate::privacy_win_mag::stop();
}