mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix win, local detect some dead code
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -64,6 +64,8 @@ pub mod client {
|
||||
match state {
|
||||
GrabState::Ready => {}
|
||||
GrabState::Run => {
|
||||
#[cfg(windows)]
|
||||
update_grab_get_key_name();
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
KEYBOARD_HOOKED.swap(true, Ordering::SeqCst);
|
||||
|
||||
@@ -184,6 +186,15 @@ pub mod client {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn update_grab_get_key_name() {
|
||||
match get_keyboard_mode_enum() {
|
||||
KeyboardMode::Map => rdev::set_get_key_name(false),
|
||||
KeyboardMode::Translate => rdev::set_get_key_name(true),
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
|
||||
pub fn start_grab_loop() {
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
std::thread::spawn(move || {
|
||||
|
||||
Reference in New Issue
Block a user