mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-10 20:23:07 +08:00
Fix. Do not send resolutions on file transfer conn (#6748)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
f7f2d84e1f
commit
fc0fc5ea10
@ -1172,6 +1172,11 @@ impl Connection {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
|
let mut sub_service = false;
|
||||||
|
if self.file_transfer.is_some() {
|
||||||
|
res.set_peer_info(pi);
|
||||||
|
} else {
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
{
|
{
|
||||||
pi.resolutions = Some(SupportedResolutions {
|
pi.resolutions = Some(SupportedResolutions {
|
||||||
@ -1188,10 +1193,6 @@ impl Connection {
|
|||||||
.into();
|
.into();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut sub_service = false;
|
|
||||||
if self.file_transfer.is_some() {
|
|
||||||
res.set_peer_info(pi);
|
|
||||||
} else {
|
|
||||||
try_activate_screen();
|
try_activate_screen();
|
||||||
if let Some(msg_out) = super::video_service::is_inited_msg() {
|
if let Some(msg_out) = super::video_service::is_inited_msg() {
|
||||||
self.send(msg_out).await;
|
self.send(msg_out).await;
|
||||||
@ -3200,12 +3201,12 @@ fn start_wakelock_thread() -> std::sync::mpsc::Sender<(usize, usize)> {
|
|||||||
log::info!("drop wakelock");
|
log::info!("drop wakelock");
|
||||||
} else {
|
} else {
|
||||||
let mut display = remote_count > 0;
|
let mut display = remote_count > 0;
|
||||||
if let Some(w) = wakelock.as_mut() {
|
if let Some(_w) = wakelock.as_mut() {
|
||||||
if display != last_display {
|
if display != last_display {
|
||||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||||
{
|
{
|
||||||
log::info!("set wakelock display to {display}");
|
log::info!("set wakelock display to {display}");
|
||||||
if let Err(e) = w.set_display(display) {
|
if let Err(e) = _w.set_display(display) {
|
||||||
log::error!(
|
log::error!(
|
||||||
"failed to set wakelock display to {display}: {e:?}"
|
"failed to set wakelock display to {display}: {e:?}"
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user