mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-28 13:03:19 +03:00
linux x11 rgb565 capture (#8580)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ impl Capturer {
|
||||
pub fn new(display: Display) -> io::Result<Capturer> {
|
||||
// Calculate dimensions.
|
||||
|
||||
let pixel_width = 4;
|
||||
let pixel_width = display.pixfmt().bytes_per_pixel();
|
||||
let rect = display.rect();
|
||||
let size = (rect.w as usize) * (rect.h as usize) * pixel_width;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user