mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -1010,7 +1010,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
Some(login_response::Union::PeerInfo(pi)) => {
|
||||
#[cfg(feature = "flutter")]
|
||||
{
|
||||
self.handler.pi = pi.clone();
|
||||
*self.handler.pi.write().unwrap() = pi.clone();
|
||||
}
|
||||
self.handler.handle_peer_info(pi);
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
@@ -1280,7 +1280,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
Some(misc::Union::SwitchDisplay(s)) => {
|
||||
#[cfg(feature = "flutter")]
|
||||
{
|
||||
self.handler.switch_display = s.clone();
|
||||
*self.handler.switch_display.write().unwrap() = s.clone();
|
||||
}
|
||||
self.handler.handle_peer_switch_display(&s);
|
||||
self.video_sender.send(MediaData::Reset).ok();
|
||||
|
||||
@@ -603,8 +603,9 @@ pub fn session_change_resolution(session_id: SessionID, display: i32, width: i32
|
||||
|
||||
pub fn session_handle_peer_info(session_id: SessionID) {
|
||||
if let Some(session) = SESSIONS.write().unwrap().get_mut(&session_id) {
|
||||
session.handle_peer_info(session.pi.clone());
|
||||
session.handle_peer_switch_display(&session.switch_display);
|
||||
let pi = session.pi.read().unwrap().clone();
|
||||
session.handle_peer_info(pi);
|
||||
session.handle_peer_switch_display(&session.switch_display.read().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ pub struct Session<T: InvokeUiSession> {
|
||||
pub server_clipboard_enabled: Arc<RwLock<bool>>,
|
||||
pub last_change_display: Arc<Mutex<ChangeDisplayRecord>>,
|
||||
#[cfg(feature = "flutter")]
|
||||
pub pi: PeerInfo,
|
||||
pub pi: Arc<RwLock<PeerInfo>>,
|
||||
#[cfg(feature = "flutter")]
|
||||
pub switch_display: SwitchDisplay,
|
||||
pub switch_display: Arc<RwLock<SwitchDisplay>>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user