debug restore resolution

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-06-05 20:21:21 +08:00
parent 3c2bf2c154
commit 6959f044f0
5 changed files with 39 additions and 31 deletions

View File

@@ -35,7 +35,7 @@ use hbb_common::{
Config, PeerConfig, PeerInfoSerde, Resolution, CONNECT_TIMEOUT, READ_TIMEOUT, RELAY_PORT,
},
get_version_number, log,
message_proto::{option_message::BoolOption, Resolution as ProtoResolution, *},
message_proto::{option_message::BoolOption, *},
protobuf::Message as _,
rand,
rendezvous_proto::*,
@@ -1404,16 +1404,6 @@ impl LoginConfigHandler {
msg.disable_clipboard = BoolOption::Yes.into();
n += 1;
}
if let Some(r) = self.get_custom_resolution(0) {
if r.0 > 0 && r.1 > 0 {
msg.custom_resolution = Some(ProtoResolution {
width: r.0,
height: r.1,
..Default::default()
})
.into();
}
}
msg.supported_decoding =
hbb_common::protobuf::MessageField::some(Decoder::supported_decodings(Some(&self.id)));
n += 1;