Merge pull request #4679 from fufesou/fix/original_resolution_0x0

version-compatible original resolution
This commit is contained in:
RustDesk 2023-06-17 19:32:22 +08:00 committed by GitHub
commit decd18f6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,8 +287,10 @@ impl FlutterHandler {
h.insert("width", d.width);
h.insert("height", d.height);
h.insert("cursor_embedded", if d.cursor_embedded { 1 } else { 0 });
h.insert("original_width", d.original_resolution.width);
h.insert("original_height", d.original_resolution.height);
if let Some(original_resolution) = d.original_resolution.as_ref() {
h.insert("original_width", original_resolution.width);
h.insert("original_height", original_resolution.height);
}
msg_vec.push(h);
}
serde_json::ser::to_string(&msg_vec).unwrap_or("".to_owned())